/[qemu]/qemu/hw/es1370.c
ViewVC logotype

Diff of /qemu/hw/es1370.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by bellard, Sat Nov 5 18:55:28 2005 UTC revision 1.3 by bellard, Fri Nov 11 00:00:09 2005 UTC
# Line 249  static void print_sctl (uint32_t val) Line 249  static void print_sctl (uint32_t val)
249  #endif  #endif
250    
251  #ifndef SILENT_ES1370  #ifndef SILENT_ES1370
252  #define lwarn(...) AUD_log ("es1370: warning:", __VA_ARGS__)  #define lwarn(...) AUD_log ("es1370: warning", __VA_ARGS__)
253  #else  #else
254  #define lwarn(...)  #define lwarn(...)
255  #endif  #endif
# Line 590  IO_WRITE_PROTO (es1370_writel) Line 590  IO_WRITE_PROTO (es1370_writel)
590          ldebug ("chan %d frame address %#x\n", d - &s->chan[0], val);          ldebug ("chan %d frame address %#x\n", d - &s->chan[0], val);
591          break;          break;
592    
593        case ES1370_REG_PHANTOM_FRAMECNT:
594            lwarn ("writing to phantom frame count %#x\n", val);
595            break;
596        case ES1370_REG_PHANTOM_FRAMEADR:
597            lwarn ("writing to phantom frame address %#x\n", val);
598            break;
599    
600      case ES1370_REG_ADC_FRAMECNT:      case ES1370_REG_ADC_FRAMECNT:
601          d++;          d++;
602      case ES1370_REG_DAC2_FRAMECNT:      case ES1370_REG_DAC2_FRAMECNT:
# Line 659  IO_READ_PROTO (es1370_readw) Line 666  IO_READ_PROTO (es1370_readw)
666          val = d->scount >> 16;          val = d->scount >> 16;
667          break;          break;
668    
669        case ES1370_REG_ADC_FRAMECNT:
670            d++;
671        case ES1370_REG_DAC2_FRAMECNT:
672            d++;
673        case ES1370_REG_DAC1_FRAMECNT:
674            val = d->frame_cnt & 0xffff;
675            break;
676    
677        case ES1370_REG_ADC_FRAMECNT + 2:
678            d++;
679        case ES1370_REG_DAC2_FRAMECNT + 2:
680            d++;
681        case ES1370_REG_DAC1_FRAMECNT + 2:
682            val = d->frame_cnt >> 16;
683            break;
684    
685      default:      default:
686          val = ~0;          val = ~0;
687          lwarn ("readw %#x -> %#x\n", addr, val);          lwarn ("readw %#x -> %#x\n", addr, val);
# Line 736  IO_READ_PROTO (es1370_readl) Line 759  IO_READ_PROTO (es1370_readl)
759          val = d->frame_addr;          val = d->frame_addr;
760          break;          break;
761    
762        case ES1370_REG_PHANTOM_FRAMECNT:
763            val = ~0U;
764            lwarn ("reading from phantom frame count\n");
765            break;
766        case ES1370_REG_PHANTOM_FRAMEADR:
767            val = ~0U;
768            lwarn ("reading from phantom frame address\n");
769            break;
770    
771      default:      default:
772          val = ~0U;          val = ~0U;
773          lwarn ("readl %#x -> %#x\n", addr, val);          lwarn ("readl %#x -> %#x\n", addr, val);
# Line 812  static void es1370_transfer_audio (ES137 Line 844  static void es1370_transfer_audio (ES137
844      if (s->sctl & loop_sel) {      if (s->sctl & loop_sel) {
845          /* Bah, how stupid is that having a 0 represent true value?          /* Bah, how stupid is that having a 0 represent true value?
846             i just spent few hours on this shit */             i just spent few hours on this shit */
847          lwarn ("whoops non looping mode\n");          AUD_log ("es1370: warning", "non looping mode\n");
848      }      }
849      else {      else {
850          d->frame_cnt = size;          d->frame_cnt = size;
# Line 983  int es1370_init (PCIBus *bus, AudioState Line 1015  int es1370_init (PCIBus *bus, AudioState
1015                                                  -1, NULL, NULL);                                                  -1, NULL, NULL);
1016    
1017      if (!d) {      if (!d) {
1018          fprintf (stderr, "Failed to register PCI device for ES1370\n");          AUD_log (NULL, "Failed to register PCI device for ES1370\n");
1019          return -1;          return -1;
1020      }      }
1021    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26