Changeset 210 for GPL/branches/alsa-resync1/alsa-kernel/pci
- Timestamp:
 - Jul 13, 2007, 4:47:31 PM (18 years ago)
 - Location:
 - GPL/branches/alsa-resync1/alsa-kernel/pci
 - Files:
 - 
      
- 9 deleted
 - 22 edited
 
- 
          
  ali5451/ali5451.c (modified) (5 diffs)
 - 
          
  ali5451/diff.cmd (deleted)
 - 
          
  als4000.c (modified) (3 diffs)
 - 
          
  cmipci.c (modified) (10 diffs)
 - 
          
  cs4281.c (modified) (5 diffs)
 - 
          
  cs46xx/diff.cmd (deleted)
 - 
          
  cs46xx/diff1.cmd (deleted)
 - 
          
  diff.cmd (deleted)
 - 
          
  diff1.cmd (deleted)
 - 
          
  diff810.cmd (deleted)
 - 
          
  emu10k1/emumixer.c (modified) (1 diff)
 - 
          
  emu10k1/emumpu401.c (modified) (1 diff)
 - 
          
  emu10k1/emuproc.c (modified) (1 diff)
 - 
          
  emu10k1/irq.c (modified) (1 diff)
 - 
          
  emu10k1/voice.c (modified) (1 diff)
 - 
          
  es1938.old (deleted)
 - 
          
  es1968.c (modified) (4 diffs)
 - 
          
  fm801.c (modified) (10 diffs)
 - 
          
  ice1712.c (modified) (37 diffs)
 - 
          
  intel8x0.c (modified) (1 diff)
 - 
          
  korg1212/korg1212.c (modified) (7 diffs)
 - 
          
  nm256/diff.cmd (deleted)
 - 
          
  rme96.c (modified) (11 diffs)
 - 
          
  rme9652/hdsp.c (modified) (36 diffs)
 - 
          
  rme9652/rme9652.c (modified) (15 diffs)
 - 
          
  sonicvibes.c (modified) (7 diffs)
 - 
          
  trident/diff.cmd (deleted)
 - 
          
  trident/trident.c (modified) (1 diff)
 - 
          
  trident/trident_main.c (modified) (20 diffs)
 - 
          
  trident/trident_memory.c (modified) (1 diff)
 - 
          
  ymfpci/ymfpci_main.c (modified) (11 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/ali5451/ali5451.c
r207 r210 1592 1592 static snd_pcm_hardware_t snd_ali_playback = 1593 1593 { 1594 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1594 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1595 1595 SNDRV_PCM_INFO_BLOCK_TRANSFER | 1596 1596 SNDRV_PCM_INFO_MMAP_VALID | 1597 1597 SNDRV_PCM_INFO_RESUME | 1598 1598 SNDRV_PCM_INFO_SYNC_START), 1599 /* formats: */(SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE |1599 .formats = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE | 1600 1600 SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U16_LE), 1601 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,1602 /* rate_min: */4000,1603 /* rate_max: */48000,1604 /* channels_min: */1,1605 /* channels_max: */2,1606 /* buffer_bytes_max: */(256*1024),1607 /* period_bytes_min: */64,1608 /* period_bytes_max: */(256*1024),1609 /* periods_min: */1,1610 /* periods_max: */1024,1611 /* fifo_size: */0,1601 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 1602 .rate_min = 4000, 1603 .rate_max = 48000, 1604 .channels_min = 1, 1605 .channels_max = 2, 1606 .buffer_bytes_max = (256*1024), 1607 .period_bytes_min = 64, 1608 .period_bytes_max = (256*1024), 1609 .periods_min = 1, 1610 .periods_max = 1024, 1611 .fifo_size = 0, 1612 1612 }; 1613 1613 … … 1618 1618 static snd_pcm_hardware_t snd_ali_capture = 1619 1619 { 1620 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1620 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1621 1621 SNDRV_PCM_INFO_BLOCK_TRANSFER | 1622 1622 SNDRV_PCM_INFO_MMAP_VALID | 1623 1623 SNDRV_PCM_INFO_RESUME | 1624 1624 SNDRV_PCM_INFO_SYNC_START), 1625 /* formats: */(SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE |1625 .formats = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE | 1626 1626 SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U16_LE), 1627 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,1628 /* rate_min: */4000,1629 /* rate_max: */48000,1630 /* channels_min: */1,1631 /* channels_max: */2,1632 /* buffer_bytes_max: */(128*1024),1633 /* period_bytes_min: */64,1634 /* period_bytes_max: */(128*1024),1635 /* periods_min: */1,1636 /* periods_max: */1024,1637 /* fifo_size: */0,1627 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 1628 .rate_min = 4000, 1629 .rate_max = 48000, 1630 .channels_min = 1, 1631 .channels_max = 2, 1632 .buffer_bytes_max = (128*1024), 1633 .period_bytes_min = 64, 1634 .period_bytes_max = (128*1024), 1635 .periods_min = 1, 1636 .periods_max = 1024, 1637 .fifo_size = 0, 1638 1638 }; 1639 1639 … … 1721 1721 } 1722 1722 1723 #ifdef TARGET_OS21724 1723 static snd_pcm_ops_t snd_ali_playback_ops = { 1725 snd_ali_playback_open,1726 snd_ali_playback_close,1727 snd_ali_ioctl,1728 snd_ali_playback_hw_params,1729 snd_ali_playback_hw_free,1730 snd_ali_playback_prepare,1731 snd_ali_trigger,1732 snd_ali_playback_pointer,0,0 1724 .open = snd_ali_playback_open, 1725 .close = snd_ali_playback_close, 1726 .ioctl = snd_ali_ioctl, 1727 .hw_params = snd_ali_playback_hw_params, 1728 .hw_free = snd_ali_playback_hw_free, 1729 .prepare = snd_ali_playback_prepare, 1730 .trigger = snd_ali_trigger, 1731 .pointer = snd_ali_playback_pointer, 1733 1732 }; 1734 1733 1735 1734 static snd_pcm_ops_t snd_ali_capture_ops = { 1736 snd_ali_capture_open,1737 snd_ali_capture_close,1738 snd_ali_ioctl,1739 snd_ali_capture_hw_params,1740 snd_ali_capture_hw_free,1741 snd_ali_capture_prepare,1742 snd_ali_trigger,1743 snd_ali_capture_pointer,0,0 1735 .open = snd_ali_capture_open, 1736 .close = snd_ali_capture_close, 1737 .ioctl = snd_ali_ioctl, 1738 .hw_params = snd_ali_capture_hw_params, 1739 .hw_free = snd_ali_capture_hw_free, 1740 .prepare = snd_ali_capture_prepare, 1741 .trigger = snd_ali_trigger, 1742 .pointer = snd_ali_capture_pointer, 1744 1743 }; 1745 #else1746 static snd_pcm_ops_t snd_ali_playback_ops = {1747 open: snd_ali_playback_open,1748 close: snd_ali_playback_close,1749 ioctl: snd_ali_ioctl,1750 hw_params: snd_ali_playback_hw_params,1751 hw_free: snd_ali_playback_hw_free,1752 prepare: snd_ali_playback_prepare,1753 trigger: snd_ali_trigger,1754 pointer: snd_ali_playback_pointer,1755 };1756 1757 static snd_pcm_ops_t snd_ali_capture_ops = {1758 open: snd_ali_capture_open,1759 close: snd_ali_capture_close,1760 ioctl: snd_ali_ioctl,1761 hw_params: snd_ali_capture_hw_params,1762 hw_free: snd_ali_capture_hw_free,1763 prepare: snd_ali_capture_prepare,1764 trigger: snd_ali_trigger,1765 pointer: snd_ali_capture_pointer,1766 };1767 #endif1768 1744 1769 1745 static void snd_ali_pcm_free(snd_pcm_t *pcm) … … 1801 1777 } 1802 1778 1803 1804 #ifdef TARGET_OS21805 1779 #define ALI5451_SPDIF(xname, xindex, value) \ 1806 { SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, xindex,\ 1807 0, 0, snd_ali5451_spdif_info, snd_ali5451_spdif_get, \ 1808 snd_ali5451_spdif_put, 0, value} 1809 #else 1810 #define ALI5451_SPDIF(xname, xindex, value) \ 1811 { iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\ 1812 info: snd_ali5451_spdif_info, get: snd_ali5451_spdif_get, \ 1813 put: snd_ali5451_spdif_put, private_value: value} 1814 #endif 1780 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex,\ 1781 .info = snd_ali5451_spdif_info, .get = snd_ali5451_spdif_get, \ 1782 .put = snd_ali5451_spdif_put, .private_value = value} 1815 1783 1816 1784 static int snd_ali5451_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) … … 2317 2285 2318 2286 static struct pci_driver driver = { 2319 0,0,0,"ALI 5451",2320 snd_ali_ids,2321 snd_ali_probe,2322 snd_ali_remove,2287 .name = "ALI 5451", 2288 .id_table = snd_ali_ids, 2289 .probe = snd_ali_probe, 2290 .remove = __devexit_p(snd_ali_remove), 2323 2291 SND_PCI_PM_CALLBACKS 2324 2292 };  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/als4000.c
r207 r210 404 404 /*****************************************************************/ 405 405 406 #ifdef TARGET_OS2407 406 static snd_pcm_hardware_t snd_als4000_playback = 408 407 { 409 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |410 SNDRV_PCM_INFO_MMAP_VALID),411 /* formats: */SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |412 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE, /* formats */413 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,414 /* rate_min: */4000,415 /* rate_max: */48000,416 /* channels_min: */1,417 /* channels_max: */2,418 /* buffer_bytes_max: */65536,419 /* period_bytes_min: */64,420 /* period_bytes_max: */65536,421 /* periods_min: */1,422 /* periods_max: */1024,423 /* fifo_size: */0408 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 409 SNDRV_PCM_INFO_MMAP_VALID), 410 .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | 411 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE, /* formats */ 412 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 413 .rate_min = 4000, 414 .rate_max = 48000, 415 .channels_min = 1, 416 .channels_max = 2, 417 .buffer_bytes_max = 65536, 418 .period_bytes_min = 64, 419 .period_bytes_max = 65536, 420 .periods_min = 1, 421 .periods_max = 1024, 422 .fifo_size = 0 424 423 }; 425 424 426 425 static snd_pcm_hardware_t snd_als4000_capture = 427 426 { 428 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |429 SNDRV_PCM_INFO_MMAP_VALID),430 /* formats: */SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |431 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE, /* formats */432 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,433 /* rate_min: */4000,434 /* rate_max: */48000,435 /* channels_min: */1,436 /* channels_max: */2,437 /* buffer_bytes_max: */65536,438 /* period_bytes_min: */64,439 /* period_bytes_max: */65536,440 /* periods_min: */1,441 /* periods_max: */1024,442 /* fifo_size: */0427 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 428 SNDRV_PCM_INFO_MMAP_VALID), 429 .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | 430 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE, /* formats */ 431 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 432 .rate_min = 4000, 433 .rate_max = 48000, 434 .channels_min = 1, 435 .channels_max = 2, 436 .buffer_bytes_max = 65536, 437 .period_bytes_min = 64, 438 .period_bytes_max = 65536, 439 .periods_min = 1, 440 .periods_max = 1024, 441 .fifo_size = 0 443 442 }; 444 #else445 static snd_pcm_hardware_t snd_als4000_playback =446 {447 info: (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |448 SNDRV_PCM_INFO_MMAP_VALID),449 formats: SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |450 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE, /* formats */451 rates: SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,452 rate_min: 4000,453 rate_max: 48000,454 channels_min: 1,455 channels_max: 2,456 buffer_bytes_max: 65536,457 period_bytes_min: 64,458 period_bytes_max: 65536,459 periods_min: 1,460 periods_max: 1024,461 fifo_size: 0462 };463 464 static snd_pcm_hardware_t snd_als4000_capture =465 {466 info: (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |467 SNDRV_PCM_INFO_MMAP_VALID),468 formats: SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |469 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE, /* formats */470 rates: SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,471 rate_min: 4000,472 rate_max: 48000,473 channels_min: 1,474 channels_max: 2,475 buffer_bytes_max: 65536,476 period_bytes_min: 64,477 period_bytes_max: 65536,478 periods_min: 1,479 periods_max: 1024,480 fifo_size: 0481 };482 #endif483 443 484 444 /*****************************************************************/ … … 524 484 /******************************************************************/ 525 485 526 #ifdef TARGET_OS2527 486 static snd_pcm_ops_t snd_als4000_playback_ops = { 528 snd_als4000_playback_open,529 snd_als4000_playback_close,530 snd_pcm_lib_ioctl,531 snd_als4000_hw_params,532 snd_als4000_hw_free,533 snd_als4000_playback_prepare,534 snd_als4000_playback_trigger,535 snd_als4000_playback_pointer,0,0 487 .open = snd_als4000_playback_open, 488 .close = snd_als4000_playback_close, 489 .ioctl = snd_pcm_lib_ioctl, 490 .hw_params = snd_als4000_hw_params, 491 .hw_free = snd_als4000_hw_free, 492 .prepare = snd_als4000_playback_prepare, 493 .trigger = snd_als4000_playback_trigger, 494 .pointer = snd_als4000_playback_pointer 536 495 }; 537 496 538 497 static snd_pcm_ops_t snd_als4000_capture_ops = { 539 snd_als4000_capture_open,540 snd_als4000_capture_close,541 snd_pcm_lib_ioctl,542 snd_als4000_hw_params,543 snd_als4000_hw_free,544 snd_als4000_capture_prepare,545 snd_als4000_capture_trigger,546 snd_als4000_capture_pointer,0,0 498 .open = snd_als4000_capture_open, 499 .close = snd_als4000_capture_close, 500 .ioctl = snd_pcm_lib_ioctl, 501 .hw_params = snd_als4000_hw_params, 502 .hw_free = snd_als4000_hw_free, 503 .prepare = snd_als4000_capture_prepare, 504 .trigger = snd_als4000_capture_trigger, 505 .pointer = snd_als4000_capture_pointer 547 506 }; 548 #else549 static snd_pcm_ops_t snd_als4000_playback_ops = {550 open: snd_als4000_playback_open,551 close: snd_als4000_playback_close,552 ioctl: snd_pcm_lib_ioctl,553 hw_params: snd_als4000_hw_params,554 hw_free: snd_als4000_hw_free,555 prepare: snd_als4000_playback_prepare,556 trigger: snd_als4000_playback_trigger,557 pointer: snd_als4000_playback_pointer558 };559 560 static snd_pcm_ops_t snd_als4000_capture_ops = {561 open: snd_als4000_capture_open,562 close: snd_als4000_capture_close,563 ioctl: snd_pcm_lib_ioctl,564 hw_params: snd_als4000_hw_params,565 hw_free: snd_als4000_hw_free,566 prepare: snd_als4000_capture_prepare,567 trigger: snd_als4000_capture_trigger,568 pointer: snd_als4000_capture_pointer569 };570 #endif571 507 572 508 static void snd_als4000_pcm_free(snd_pcm_t *pcm) … … 781 717 } 782 718 783 #ifdef TARGET_OS2784 719 static struct pci_driver driver = { 785 0,0,0,"ALS4000",786 snd_als4000_ids,787 snd_card_als4000_probe,788 snd_card_als4000_remove,0,0 720 .name = "ALS4000", 721 .id_table = snd_als4000_ids, 722 .probe = snd_card_als4000_probe, 723 .remove = __devexit_p(snd_card_als4000_remove), 789 724 }; 790 #else791 static struct pci_driver driver = {792 name: "ALS4000",793 id_table: snd_als4000_ids,794 probe: snd_card_als4k_probe,795 remove: snd_card_als4k_remove,796 };797 #endif798 725 799 726 static int __init alsa_card_als4000_init(void)  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/cmipci.c
r206 r210 1002 1002 static struct snd_kcontrol_new snd_cmipci_spdif_default __devinitdata = 1003 1003 { 1004 SNDRV_CTL_ELEM_IFACE_PCM,0,0,1005 SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),0,0,0,1006 snd_cmipci_spdif_default_info,1007 snd_cmipci_spdif_default_get,1008 snd_cmipci_spdif_default_put,0 1004 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1005 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 1006 .info = snd_cmipci_spdif_default_info, 1007 .get = snd_cmipci_spdif_default_get, 1008 .put = snd_cmipci_spdif_default_put 1009 1009 }; 1010 1010 … … 1029 1029 static struct snd_kcontrol_new snd_cmipci_spdif_mask __devinitdata = 1030 1030 { 1031 SNDRV_CTL_ELEM_IFACE_MIXER,0,0,1032 SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),0,1033 SNDRV_CTL_ELEM_ACCESS_READ,0,1034 snd_cmipci_spdif_mask_info,1035 snd_cmipci_spdif_mask_get,0,0 1031 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1032 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1033 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK), 1034 .info = snd_cmipci_spdif_mask_info, 1035 .get = snd_cmipci_spdif_mask_get, 1036 1036 }; 1037 1037 … … 1076 1076 static struct snd_kcontrol_new snd_cmipci_spdif_stream __devinitdata = 1077 1077 { 1078 SNDRV_CTL_ELEM_IFACE_PCM,0,0,1079 SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),0,1080 SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,0,1081 snd_cmipci_spdif_stream_info,1082 snd_cmipci_spdif_stream_get,1083 snd_cmipci_spdif_stream_put,0 1078 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 1079 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1080 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), 1081 .info = snd_cmipci_spdif_stream_info, 1082 .get = snd_cmipci_spdif_stream_get, 1083 .put = snd_cmipci_spdif_stream_put 1084 1084 }; 1085 1085 … … 1839 1839 1840 1840 #define CMIPCI_DOUBLE(xname, left_reg, right_reg, left_shift, right_shift, mask, invert, stereo) \ 1841 { SNDRV_CTL_ELEM_IFACE_MIXER, 0, 0, xname, 0, \ 1842 0, 0, snd_cmipci_info_volume, \ 1843 snd_cmipci_get_volume, snd_cmipci_put_volume, \ 1844 0,\ 1845 COMPOSE_SB_REG(left_reg, right_reg, left_shift, right_shift, mask, invert, stereo), \ 1841 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 1842 .info = snd_cmipci_info_volume, \ 1843 .get = snd_cmipci_get_volume, .put = snd_cmipci_put_volume, \ 1844 .private_value = COMPOSE_SB_REG(left_reg, right_reg, left_shift, right_shift, mask, invert, stereo), \ 1846 1845 } 1847 1846 … … 1941 1940 */ 1942 1941 #define CMIPCI_SB_INPUT_SW(xname, left_shift, right_shift) \ 1943 { SNDRV_CTL_ELEM_IFACE_MIXER, 0, 0, xname, 0, \ 1944 0, 0, snd_cmipci_info_input_sw, \ 1945 snd_cmipci_get_input_sw, snd_cmipci_put_input_sw, \ 1946 0, \ 1947 COMPOSE_SB_REG(SB_DSP4_INPUT_LEFT, SB_DSP4_INPUT_RIGHT, left_shift, right_shift, 1, 0, 1), \ 1942 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 1943 .info = snd_cmipci_info_input_sw, \ 1944 .get = snd_cmipci_get_input_sw, .put = snd_cmipci_put_input_sw, \ 1945 .private_value = COMPOSE_SB_REG(SB_DSP4_INPUT_LEFT, SB_DSP4_INPUT_RIGHT, left_shift, right_shift, 1, 0, 1), \ 1948 1946 } 1949 1947 static int snd_cmipci_info_input_sw(struct snd_kcontrol *kcontrol, … … 2006 2004 2007 2005 #define CMIPCI_MIXER_SW_STEREO(xname, reg, lshift, rshift, invert) \ 2008 { SNDRV_CTL_ELEM_IFACE_MIXER, 0, 0, xname, 0, \ 2009 0, 0, snd_cmipci_info_native_mixer, \ 2010 snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \ 2011 0, \ 2012 COMPOSE_SB_REG(reg, reg, lshift, rshift, 1, invert, 1), \ 2006 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 2007 .info = snd_cmipci_info_native_mixer, \ 2008 .get = snd_cmipci_get_native_mixer, .put = snd_cmipci_put_native_mixer, \ 2009 .private_value = COMPOSE_SB_REG(reg, reg, lshift, rshift, 1, invert, 1), \ 2013 2010 } 2014 2011 2015 2012 #define CMIPCI_MIXER_SW_MONO(xname, reg, shift, invert) \ 2016 { SNDRV_CTL_ELEM_IFACE_MIXER, 0, 0, xname, 0, \ 2017 0, 0, snd_cmipci_info_native_mixer, \ 2018 snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \ 2019 0, \ 2020 COMPOSE_SB_REG(reg, reg, shift, shift, 1, invert, 0), \ 2013 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 2014 .info = snd_cmipci_info_native_mixer, \ 2015 .get = snd_cmipci_get_native_mixer, .put = snd_cmipci_put_native_mixer, \ 2016 .private_value = COMPOSE_SB_REG(reg, reg, shift, shift, 1, invert, 0), \ 2021 2017 } 2022 2018 2023 2019 #define CMIPCI_MIXER_VOL_STEREO(xname, reg, lshift, rshift, mask) \ 2024 { SNDRV_CTL_ELEM_IFACE_MIXER, 0, 0, xname, 0, \ 2025 0, 0, snd_cmipci_info_native_mixer, \ 2026 snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \ 2027 0, \ 2028 COMPOSE_SB_REG(reg, reg, lshift, rshift, mask, 0, 1), \ 2020 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 2021 .info = snd_cmipci_info_native_mixer, \ 2022 .get = snd_cmipci_get_native_mixer, .put = snd_cmipci_put_native_mixer, \ 2023 .private_value = COMPOSE_SB_REG(reg, reg, lshift, rshift, mask, 0, 1), \ 2029 2024 } 2030 2025 2031 2026 #define CMIPCI_MIXER_VOL_MONO(xname, reg, shift, mask) \ 2032 { SNDRV_CTL_ELEM_IFACE_MIXER, 0, 0, xname, 0, \ 2033 0, 0, snd_cmipci_info_native_mixer, \ 2034 snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \ 2035 0, \ 2036 COMPOSE_SB_REG(reg, reg, shift, shift, mask, 0, 0), \ 2027 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 2028 .info = snd_cmipci_info_native_mixer, \ 2029 .get = snd_cmipci_get_native_mixer, .put = snd_cmipci_put_native_mixer, \ 2030 .private_value = COMPOSE_SB_REG(reg, reg, shift, shift, mask, 0, 0), \ 2037 2031 } 2038 2032 … … 2129 2123 //CMIPCI_MIXER_SW_MONO("PCM Playback Switch", CM_REG_MIXER1, CM_WSMUTE_SHIFT, 1), 2130 2124 { /* switch with sensitivity */ 2131 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 2132 "PCM Playback Switch",0,0,0, 2133 snd_cmipci_info_native_mixer, 2134 snd_cmipci_get_native_mixer_sensitive, 2135 snd_cmipci_put_native_mixer_sensitive, 2136 0, 2137 COMPOSE_SB_REG(CM_REG_MIXER1, CM_REG_MIXER1, CM_WSMUTE_SHIFT, CM_WSMUTE_SHIFT, 1, 1, 0), 2125 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2126 .name = "PCM Playback Switch", 2127 .info = snd_cmipci_info_native_mixer, 2128 .get = snd_cmipci_get_native_mixer_sensitive, 2129 .put = snd_cmipci_put_native_mixer_sensitive, 2130 .private_value = COMPOSE_SB_REG(CM_REG_MIXER1, CM_REG_MIXER1, CM_WSMUTE_SHIFT, CM_WSMUTE_SHIFT, 1, 1, 0), 2138 2131 }, 2139 2132 CMIPCI_MIXER_SW_STEREO("PCM Capture Switch", CM_REG_MIXER1, CM_WAVEINL_SHIFT, CM_WAVEINR_SHIFT, 0), … … 2260 2253 } 2261 2254 2255 #ifdef TARGET_OS2 2262 2256 #define DEFINE_SWITCH_ARG(sname, xreg, xmask, xmask_on, xis_byte, xac3) \ 2263 2257 static struct cmipci_switch_args cmipci_switch_arg_##sname = { \ 2264 xreg, \ 2265 xmask, \ 2266 xmask_on, \ 2267 xis_byte, \ 2268 xac3, \ 2269 } 2258 xreg, \ 2259 xmask, \ 2260 xmask_on, \ 2261 xis_byte, \ 2262 xac3, \ 2263 } 2264 #else 2265 #define DEFINE_SWITCH_ARG(sname, xreg, xmask, xmask_on, xis_byte, xac3) \ 2266 static struct cmipci_switch_args cmipci_switch_arg_##sname = { \ 2267 .reg = xreg, \ 2268 .mask = xmask, \ 2269 .mask_on = xmask_on, \ 2270 .is_byte = xis_byte, \ 2271 .ac3_sensitive = xac3, \ 2272 } 2273 #endif 2270 2274 2271 2275 #define DEFINE_BIT_SWITCH_ARG(sname, xreg, xmask, xis_byte, xac3) \ … … 2305 2309 // safe to do so in this case) 2306 2310 #define DEFINE_SWITCH(sname, stype, sarg) \ 2307 { stype, 0, 0, \ 2308 sname, 0, 0, 0, \ 2309 snd_cmipci_uswitch_info, \ 2310 snd_cmipci_uswitch_get, \ 2311 snd_cmipci_uswitch_put, \ 2312 0, \ 2313 (unsigned long)&cmipci_switch_arg_##sarg,\ 2311 { .name = sname, \ 2312 .iface = stype, \ 2313 .info = snd_cmipci_uswitch_info, \ 2314 .get = snd_cmipci_uswitch_get, \ 2315 .put = snd_cmipci_uswitch_put, \ 2316 .private_value = (unsigned long)&cmipci_switch_arg_##sarg,\ 2314 2317 } 2315 2318 … … 2473 2476 #endif 2474 2477 // DEFINE_MIXER_SWITCH("IEC958 Output Switch", spdif_enable), 2475 { 2476 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 2477 "IEC958 Output Switch",0,0, 0, 2478 snd_cmipci_uswitch_info, 2479 snd_cmipci_spdout_enable_get, 2480 snd_cmipci_spdout_enable_put,0 2478 { .name = "IEC958 Output Switch", 2479 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2480 .info = snd_cmipci_uswitch_info, 2481 .get = snd_cmipci_spdout_enable_get, 2482 .put = snd_cmipci_spdout_enable_put, 2481 2483 }, 2482 2484 DEFINE_MIXER_SWITCH("IEC958 In Valid", spdi_valid),  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/cs4281.c
r206 r210 882 882 static snd_pcm_hardware_t snd_cs4281_playback = 883 883 { 884 /* info: */(SNDRV_PCM_INFO_MMAP |884 .info = (SNDRV_PCM_INFO_MMAP | 885 885 SNDRV_PCM_INFO_INTERLEAVED | 886 886 SNDRV_PCM_INFO_MMAP_VALID | … … 888 888 SNDRV_PCM_INFO_RESUME | 889 889 SNDRV_PCM_INFO_SYNC_START), 890 /* formats: */SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 |890 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 | 891 891 SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_S16_LE | 892 892 SNDRV_PCM_FMTBIT_U16_BE | SNDRV_PCM_FMTBIT_S16_BE | 893 893 SNDRV_PCM_FMTBIT_U32_LE | SNDRV_PCM_FMTBIT_S32_LE | 894 894 SNDRV_PCM_FMTBIT_U32_BE | SNDRV_PCM_FMTBIT_S32_BE, 895 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,896 /* rate_min: */4000,897 /* rate_max: */48000,898 /* channels_min: */1,899 /* channels_max: */2,900 /* buffer_bytes_max: */(512*1024),901 /* period_bytes_min: */64,902 /* period_bytes_max: */(512*1024),903 /* periods_min: */1,904 /* periods_max: */2,905 /* fifo_size: */CS4281_FIFO_SIZE,895 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 896 .rate_min = 4000, 897 .rate_max = 48000, 898 .channels_min = 1, 899 .channels_max = 2, 900 .buffer_bytes_max = (512*1024), 901 .period_bytes_min = 64, 902 .period_bytes_max = (512*1024), 903 .periods_min = 1, 904 .periods_max = 2, 905 .fifo_size = CS4281_FIFO_SIZE, 906 906 }; 907 907 908 908 static snd_pcm_hardware_t snd_cs4281_capture = 909 909 { 910 /* info: */(SNDRV_PCM_INFO_MMAP |910 .info = (SNDRV_PCM_INFO_MMAP | 911 911 SNDRV_PCM_INFO_INTERLEAVED | 912 912 SNDRV_PCM_INFO_MMAP_VALID | … … 914 914 SNDRV_PCM_INFO_RESUME | 915 915 SNDRV_PCM_INFO_SYNC_START), 916 /* formats: */ //SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 |916 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 | 917 917 SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_S16_LE | 918 918 SNDRV_PCM_FMTBIT_U16_BE | SNDRV_PCM_FMTBIT_S16_BE | 919 919 SNDRV_PCM_FMTBIT_U32_LE | SNDRV_PCM_FMTBIT_S32_LE | 920 920 SNDRV_PCM_FMTBIT_U32_BE | SNDRV_PCM_FMTBIT_S32_BE, 921 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,922 /* rate_min: */4000,923 /* rate_max: */48000,924 /* channels_min: */1,925 /* channels_max: */2,926 /* buffer_bytes_max: */(512*1024),927 /* period_bytes_min: */64,928 /* period_bytes_max: */(512*1024),929 /* periods_min: */1,930 /* periods_max: */2,931 /* fifo_size: */CS4281_FIFO_SIZE,921 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 922 .rate_min = 4000, 923 .rate_max = 48000, 924 .channels_min = 1, 925 .channels_max = 2, 926 .buffer_bytes_max = (512*1024), 927 .period_bytes_min = 64, 928 .period_bytes_max = (512*1024), 929 .periods_min = 1, 930 .periods_max = 2, 931 .fifo_size = CS4281_FIFO_SIZE, 932 932 }; 933 933 … … 989 989 990 990 static snd_pcm_ops_t snd_cs4281_playback_ops = { 991 /* .open = */ snd_cs4281_playback_open, 992 /* .close = */ snd_cs4281_playback_close, 993 /* .ioctl = */ snd_pcm_lib_ioctl, 994 /* .hw_params = */ snd_cs4281_hw_params, 995 /* .hw_free = */ snd_cs4281_hw_free, 996 /* .prepare = */ snd_cs4281_playback_prepare, 997 /* .trigger = */ snd_cs4281_trigger, 998 /* .pointer = */ snd_cs4281_pointer, 999 0,0,0,0 991 .open = snd_cs4281_playback_open, 992 .close = snd_cs4281_playback_close, 993 .ioctl = snd_pcm_lib_ioctl, 994 .hw_params = snd_cs4281_hw_params, 995 .hw_free = snd_cs4281_hw_free, 996 .prepare = snd_cs4281_playback_prepare, 997 .trigger = snd_cs4281_trigger, 998 .pointer = snd_cs4281_pointer, 1000 999 }; 1001 1000 1002 1001 static snd_pcm_ops_t snd_cs4281_capture_ops = { 1003 /* .open = */ snd_cs4281_capture_open, 1004 /* .close = */ snd_cs4281_capture_close, 1005 /* .ioctl = */ snd_pcm_lib_ioctl, 1006 /* .hw_params = */ snd_cs4281_hw_params, 1007 /* .hw_free = */ snd_cs4281_hw_free, 1008 /* .prepare = */ snd_cs4281_capture_prepare, 1009 /* .trigger = */ snd_cs4281_trigger, 1010 /* .pointer = */ snd_cs4281_pointer, 1011 0,0,0,0 1002 .open = snd_cs4281_capture_open, 1003 .close = snd_cs4281_capture_close, 1004 .ioctl = snd_pcm_lib_ioctl, 1005 .hw_params = snd_cs4281_hw_params, 1006 .hw_free = snd_cs4281_hw_free, 1007 .prepare = snd_cs4281_capture_prepare, 1008 .trigger = snd_cs4281_trigger, 1009 .pointer = snd_cs4281_pointer, 1012 1010 }; 1013 1011 … … 1393 1391 unsigned int tmp; 1394 1392 int err; 1395 #ifdef TARGET_OS21396 1393 static snd_device_ops_t ops = { 1397 snd_cs4281_dev_free,0,0,0 1394 .dev_free = snd_cs4281_dev_free, 1398 1395 }; 1399 #else1400 static snd_device_ops_t ops = {1401 dev_free: snd_cs4281_dev_free,1402 };1403 #endif1404 1396 1405 1397 *rchip = NULL;  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emumixer.c
r207 r210 31 31 */ 32 32 33 #define __NO_VERSION__34 33 #include <sound/driver.h> 35 34 #include <linux/time.h>  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emumpu401.c
r207 r210 20 20 */ 21 21 22 #define __NO_VERSION__23 22 #include <sound/driver.h> 24 23 #include <linux/time.h>  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emuproc.c
r207 r210 26 26 */ 27 27 28 #define __NO_VERSION__29 28 #include <sound/driver.h> 30 29 #include <linux/slab.h>  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/irq.c
r206 r210 26 26 */ 27 27 28 #define __NO_VERSION__29 28 #include <sound/driver.h> 30 29 #include <linux/time.h>  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/voice.c
r84 r210 29 29 */ 30 30 31 #define __NO_VERSION__32 31 #include <sound/driver.h> 33 32 #include <linux/time.h>  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/es1968.c
r207 r210 1727 1727 1728 1728 static snd_pcm_ops_t snd_es1968_playback_ops = { 1729 /* open: */ snd_es1968_playback_open, 1730 /* close: */ snd_es1968_playback_close, 1731 /* ioctl: */ snd_pcm_lib_ioctl, 1732 /* hw_params:*/ snd_es1968_hw_params, 1733 /* hw_free: */ snd_es1968_hw_free, 1734 /* prepare: */ snd_es1968_pcm_prepare, 1735 /* trigger: */ snd_es1968_pcm_trigger, 1736 /* pointer: */ snd_es1968_pcm_pointer, 1737 0,0 1729 .open = snd_es1968_playback_open, 1730 .close = snd_es1968_playback_close, 1731 .ioctl = snd_pcm_lib_ioctl, 1732 .hw_params = snd_es1968_hw_params, 1733 .hw_free = snd_es1968_hw_free, 1734 .prepare = snd_es1968_pcm_prepare, 1735 .trigger = snd_es1968_pcm_trigger, 1736 .pointer = snd_es1968_pcm_pointer, 1738 1737 }; 1739 1738 1740 1739 static snd_pcm_ops_t snd_es1968_capture_ops = { 1741 /* open: */ snd_es1968_capture_open, 1742 /* close: */ snd_es1968_capture_close, 1743 /* ioctl: */ snd_pcm_lib_ioctl, 1744 /* hw_params:*/ snd_es1968_hw_params, 1745 /* hw_free: */ snd_es1968_hw_free, 1746 /* prepare: */ snd_es1968_pcm_prepare, 1747 /* trigger: */ snd_es1968_pcm_trigger, 1748 /* pointer: */ snd_es1968_pcm_pointer, 1749 /* copy: */ 0, 1750 0 1740 .open = snd_es1968_capture_open, 1741 .close = snd_es1968_capture_close, 1742 .ioctl = snd_pcm_lib_ioctl, 1743 .hw_params = snd_es1968_hw_params, 1744 .hw_free = snd_es1968_hw_free, 1745 .prepare = snd_es1968_pcm_prepare, 1746 .trigger = snd_es1968_pcm_trigger, 1747 .pointer = snd_es1968_pcm_pointer, 1751 1748 }; 1752 1749 … … 2548 2545 #ifdef TARGET_OS2 2549 2546 static snd_device_ops_t ops = { 2550 snd_es1968_dev_free,0,0,0 2547 .dev_free = snd_es1968_dev_free, 2551 2548 }; 2552 2549 #else … … 2692 2689 static snd_kcontrol_new_t snd_es1968_control_switches[] __devinitdata = { 2693 2690 { 2694 /* .iface = */SNDRV_CTL_ELEM_IFACE_CARD,0,0,2695 /* .name = */"Joystick",0,0,0,2696 /* .info = */snd_es1968_joystick_info,2697 /* .get = */snd_es1968_joystick_get,2698 /* .put = */snd_es1968_joystick_put,2691 .name = "Joystick", 2692 .iface = SNDRV_CTL_ELEM_IFACE_CARD, 2693 .info = snd_es1968_joystick_info, 2694 .get = snd_es1968_joystick_get, 2695 .put = snd_es1968_joystick_put, 2699 2696 } 2700 2697 }; … … 2839 2836 2840 2837 static struct pci_driver driver = { 2841 0, 0, 0, 2842 "ES1968 (ESS Maestro)", 2843 snd_es1968_ids, 2844 snd_es1968_probe, 2845 snd_es1968_remove, 2846 SND_PCI_PM_CALLBACKS 2838 .name = "ES1968 (ESS Maestro)", 2839 .id_table = snd_es1968_ids, 2840 .probe = snd_es1968_probe, 2841 .remove = __devexit_p(snd_es1968_remove), 2842 SND_PCI_PM_CALLBACKS 2847 2843 }; 2848 2844  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/fm801.c
r206 r210 302 302 303 303 static snd_pcm_hw_constraint_list_t hw_constraints_rates = { 304 /* .count = */ARRAY_SIZE(rates),305 /* .list = */rates,306 /* .mask = */0,304 .count = ARRAY_SIZE(rates), 305 .list = rates, 306 .mask = 0, 307 307 }; 308 308 … … 314 314 315 315 static snd_pcm_hw_constraint_list_t hw_constraints_channels = { 316 /* .count = */CHANNELS,317 /* .list = */channels,318 /* .mask = */0,316 .count = CHANNELS, 317 .list = channels, 318 .mask = 0, 319 319 }; 320 320 … … 561 561 static snd_pcm_hardware_t snd_fm801_playback = 562 562 { 563 /*.info = */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |563 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 564 564 SNDRV_PCM_INFO_BLOCK_TRANSFER | 565 565 SNDRV_PCM_INFO_PAUSE | … … 581 581 static snd_pcm_hardware_t snd_fm801_capture = 582 582 { 583 /*.info = */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |583 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 584 584 SNDRV_PCM_INFO_BLOCK_TRANSFER | 585 585 SNDRV_PCM_INFO_PAUSE | … … 648 648 649 649 static snd_pcm_ops_t snd_fm801_playback_ops = { 650 /*.open = */ snd_fm801_playback_open, 651 /*.close = */ snd_fm801_playback_close, 652 /*.ioctl = */ snd_pcm_lib_ioctl, 653 /*.hw_params = */ snd_fm801_hw_params, 654 /*.hw_free = */ snd_fm801_hw_free, 655 /*.prepare = */ snd_fm801_playback_prepare, 656 /*.trigger = */ snd_fm801_playback_trigger, 657 /*.pointer = */ snd_fm801_playback_pointer, 658 0,0,0,0 650 .open = snd_fm801_playback_open, 651 .close = snd_fm801_playback_close, 652 .ioctl = snd_pcm_lib_ioctl, 653 .hw_params = snd_fm801_hw_params, 654 .hw_free = snd_fm801_hw_free, 655 .prepare = snd_fm801_playback_prepare, 656 .trigger = snd_fm801_playback_trigger, 657 .pointer = snd_fm801_playback_pointer, 659 658 }; 660 659 661 660 static snd_pcm_ops_t snd_fm801_capture_ops = { 662 /*.open = */ snd_fm801_capture_open, 663 /*.close = */ snd_fm801_capture_close, 664 /*.ioctl = */ snd_pcm_lib_ioctl, 665 /*.hw_params = */ snd_fm801_hw_params, 666 /*.hw_free = */ snd_fm801_hw_free, 667 /*.prepare = */ snd_fm801_capture_prepare, 668 /*.trigger = */ snd_fm801_capture_trigger, 669 /*.pointer = */ snd_fm801_capture_pointer, 670 0,0,0,0 661 .open = snd_fm801_capture_open, 662 .close = snd_fm801_capture_close, 663 .ioctl = snd_pcm_lib_ioctl, 664 .hw_params = snd_fm801_hw_params, 665 .hw_free = snd_fm801_hw_free, 666 .prepare = snd_fm801_capture_prepare, 667 .trigger = snd_fm801_capture_trigger, 668 .pointer = snd_fm801_capture_pointer, 671 669 }; 672 670 … … 1000 998 1001 999 #define FM801_SINGLE(xname, reg, shift, mask, invert) \ 1002 { SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, 0,0,0,snd_fm801_info_single, \1003 snd_fm801_get_single,snd_fm801_put_single, \1004 0,reg | (shift << 8) | (mask << 16) | (invert << 24) }1000 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_fm801_info_single, \ 1001 .get = snd_fm801_get_single, .put = snd_fm801_put_single, \ 1002 .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) } 1005 1003 1006 1004 static int snd_fm801_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1045 1043 1046 1044 #define FM801_DOUBLE(xname, reg, shift_left, shift_right, mask, invert) \ 1047 { SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, 0,0,0,snd_fm801_info_double, \1048 snd_fm801_get_double,snd_fm801_put_double, \1049 0,reg | (shift_left << 8) | (shift_right << 12) | (mask << 16) | (invert << 24) }1045 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_fm801_info_double, \ 1046 .get = snd_fm801_get_double, .put = snd_fm801_put_double, \ 1047 .private_value = reg | (shift_left << 8) | (shift_right << 12) | (mask << 16) | (invert << 24) } 1050 1048 1051 1049 static int snd_fm801_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1148 1146 FM801_SINGLE("FM Playback Switch", FM801_FM_VOL, 15, 1, 1), 1149 1147 { 1150 SNDRV_CTL_ELEM_IFACE_MIXER, 0,0,1151 "Digital Capture Source",0,0,0,1152 snd_fm801_info_mux,1153 snd_fm801_get_mux,1154 snd_fm801_put_mux,01148 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1149 .name = "Digital Capture Source", 1150 .info = snd_fm801_info_mux, 1151 .get = snd_fm801_get_mux, 1152 .put = snd_fm801_put_mux, 1155 1153 } 1156 1154 }; … … 1263 1261 int err; 1264 1262 static snd_device_ops_t ops = { 1265 snd_fm801_dev_free, 0,0,01263 .dev_free = snd_fm801_dev_free, 1266 1264 }; 1267 1265 … … 1468 1466 1469 1467 static struct pci_driver driver = { 1470 0,0,0, 1471 "FM801", 1472 snd_fm801_ids, 1473 snd_card_fm801_probe, 1474 snd_card_fm801_remove, 1475 0,0 1468 .name = "FM801", 1469 .id_table = snd_fm801_ids, 1470 .probe = snd_card_fm801_probe, 1471 .remove = __devexit_p(snd_card_fm801_remove), 1476 1472 }; 1477 1473  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712.c
r207 r210 700 700 701 701 static snd_kcontrol_new_t snd_ice1712_mixer_digmix_route_ac97 __devinitdata = { 702 #ifdef TARGET_OS2 703 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 704 "Digital Mixer To AC97",0,0, 705 snd_ice1712_digmix_route_ac97_info, 706 snd_ice1712_digmix_route_ac97_get, 707 snd_ice1712_digmix_route_ac97_put,0 708 #else 709 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 710 name: "Digital Mixer To AC97", 711 info: snd_ice1712_digmix_route_ac97_info, 712 get: snd_ice1712_digmix_route_ac97_get, 713 put: snd_ice1712_digmix_route_ac97_put, 714 #endif 702 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 703 .name = "Digital Mixer To AC97", 704 .info = snd_ice1712_digmix_route_ac97_info, 705 .get = snd_ice1712_digmix_route_ac97_get, 706 .put = snd_ice1712_digmix_route_ac97_put, 715 707 }; 716 708 … … 873 865 } 874 866 875 #ifdef TARGET_OS2 876 static ice1712_cs8427_ops_t snd_ice1712_ap_cs8427_ops = { 877 ap_cs8427_sendbytes, 878 ap_cs8427_readbytes, 879 ap_cs8427_probeaddr, 867 static snd_i2c_ops_t ap_cs8427_i2c_ops = { 868 .sendbytes = ap_cs8427_sendbytes, 869 .readbytes = ap_cs8427_readbytes, 870 .probeaddr = ap_cs8427_probeaddr, 880 871 }; 881 #else882 static snd_i2c_ops_t ap_cs8427_i2c_ops = {883 sendbytes: ap_cs8427_sendbytes,884 readbytes: ap_cs8427_readbytes,885 probeaddr: ap_cs8427_probeaddr,886 };887 #endif888 872 889 873 /* … … 967 951 } 968 952 969 #ifdef TARGET_OS2970 953 static snd_i2c_bit_ops_t snd_ice1712_ewx_cs8427_bit_ops = { 971 ewx_i2c_start,972 ewx_i2c_stop,973 ewx_i2c_direction,974 ewx_i2c_setlines,975 ewx_i2c_getclock,976 ewx_i2c_getdata,954 .start = ewx_i2c_start, 955 .stop = ewx_i2c_stop, 956 .direction = ewx_i2c_direction, 957 .setlines = ewx_i2c_setlines, 958 .getclock = ewx_i2c_getclock, 959 .getdata = ewx_i2c_getdata, 977 960 }; 978 #else979 static snd_i2c_bit_ops_t snd_ice1712_ewx_cs8427_bit_ops = {980 start: ewx_i2c_start,981 stop: ewx_i2c_stop,982 direction: ewx_i2c_direction,983 setlines: ewx_i2c_setlines,984 getclock: ewx_i2c_getclock,985 getdata: ewx_i2c_getdata,986 };987 #endif988 961 989 962 /* AK4524 chip select; address 0x48 bit 0-3 */ 990 static voidsnd_ice1712_ews88mt_chip_select(ice1712_t *ice, int chip_mask)963 static int snd_ice1712_ews88mt_chip_select(ice1712_t *ice, int chip_mask) 991 964 { 992 965 unsigned char data, ndata; 993 966 994 snd_assert(chip_mask >= 0 && chip_mask <= 0x0f, return );967 snd_assert(chip_mask >= 0 && chip_mask <= 0x0f, return -EINVAL); 995 968 snd_i2c_lock(ice->i2c); 996 snd_runtime_check(snd_i2c_readbytes(ice->pcf8574[1], &data, 1) == 1, snd_i2c_unlock(ice->i2c); return); 969 if (snd_i2c_readbytes(ice->pcf8574[1], &data, 1) != 1) 970 goto __error; 997 971 ndata = (data & 0xf0) | chip_mask; 998 972 if (ndata != data) 999 snd_runtime_check(snd_i2c_sendbytes(ice->pcf8574[1], &ndata, 1) == 1, snd_i2c_unlock(ice->i2c); return); 973 if (snd_i2c_sendbytes(ice->pcf8574[1], &ndata, 1) != 1) 974 goto __error; 1000 975 snd_i2c_unlock(ice->i2c); 976 return 0; 977 978 __error: 979 snd_i2c_unlock(ice->i2c); 980 snd_printk(KERN_ERR "AK4524 chip select failed, check cable to the front module\n"); 981 return -EIO; 1001 982 } 1002 983 … … 1016 997 if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_EWS88MT) { 1017 998 /* assert AK4524 CS */ 1018 snd_ice1712_ews88mt_chip_select(ice, ~(1 << chip) & 0x0f); 999 if (snd_ice1712_ews88mt_chip_select(ice, ~(1 << chip) & 0x0f) < 0) 1000 return; 1019 1001 //snd_ice1712_ews88mt_chip_select(ice, 0x0f); 1020 1002 } … … 1170 1152 unsigned char reg[2] = { 0x80 | 4, 0 }; /* CS8427 auto increment | register number 4 + data */ 1171 1153 unsigned char val, nval; 1154 int res = 0; 1155 1172 1156 snd_i2c_lock(ice->i2c); 1173 1157 if (snd_i2c_sendbytes(ice->cs8427, reg, 1) != 1) { 1174 1158 snd_i2c_unlock(ice->i2c); 1175 return -E REMOTE;1159 return -EIO; 1176 1160 } 1177 1161 if (snd_i2c_readbytes(ice->cs8427, &val, 1) != 1) { 1178 1162 snd_i2c_unlock(ice->i2c); 1179 return -E REMOTE;1163 return -EIO; 1180 1164 } 1181 1165 nval = val & 0xf0; … … 1187 1171 reg[1] = nval; 1188 1172 if (snd_i2c_sendbytes(ice->cs8427, reg, 2) != 2) { 1173 res = -EIO; 1174 } else { 1175 res++; 1176 } 1177 } 1189 1178 snd_i2c_unlock(ice->i2c); 1190 return -EREMOTE; 1191 } 1192 return 1; 1193 } 1194 snd_i2c_unlock(ice->i2c); 1195 return 0; 1179 return res; 1196 1180 } 1197 1181 … … 1553 1537 } 1554 1538 1555 #ifdef TARGET_OS21556 1539 static snd_pcm_hardware_t snd_ice1712_playback = 1557 1540 { 1558 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1541 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1559 1542 SNDRV_PCM_INFO_BLOCK_TRANSFER | 1560 1543 SNDRV_PCM_INFO_MMAP_VALID | 1561 1544 SNDRV_PCM_INFO_PAUSE), 1562 /* formats: */SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,1563 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,1564 /* rate_min: */4000,1565 /* rate_max: */48000,1566 /* channels_min: */1,1567 /* channels_max: */2,1568 /* buffer_bytes_max: */(64*1024),1569 /* period_bytes_min: */64,1570 /* period_bytes_max: */(64*1024),1571 /* periods_min: */1,1572 /* periods_max: */1024,1573 /* fifo_size: */0,1545 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, 1546 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 1547 .rate_min = 4000, 1548 .rate_max = 48000, 1549 .channels_min = 1, 1550 .channels_max = 2, 1551 .buffer_bytes_max = (64*1024), 1552 .period_bytes_min = 64, 1553 .period_bytes_max = (64*1024), 1554 .periods_min = 1, 1555 .periods_max = 1024, 1556 .fifo_size = 0, 1574 1557 }; 1575 1558 1576 1559 static snd_pcm_hardware_t snd_ice1712_playback_ds = 1577 1560 { 1578 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1561 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1579 1562 SNDRV_PCM_INFO_BLOCK_TRANSFER | 1580 1563 SNDRV_PCM_INFO_MMAP_VALID | 1581 1564 SNDRV_PCM_INFO_PAUSE), 1582 /* formats: */SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,1583 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,1584 /* rate_min: */4000,1585 /* rate_max: */48000,1586 /* channels_min: */1,1587 /* channels_max: */2,1588 /* buffer_bytes_max: */(128*1024),1589 /* period_bytes_min: */64,1590 /* period_bytes_max: */(128*1024),1591 /* periods_min: */2,1592 /* periods_max: */2,1593 /* fifo_size: */0,1565 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, 1566 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 1567 .rate_min = 4000, 1568 .rate_max = 48000, 1569 .channels_min = 1, 1570 .channels_max = 2, 1571 .buffer_bytes_max = (128*1024), 1572 .period_bytes_min = 64, 1573 .period_bytes_max = (128*1024), 1574 .periods_min = 2, 1575 .periods_max = 2, 1576 .fifo_size = 0, 1594 1577 }; 1595 1578 1596 1579 static snd_pcm_hardware_t snd_ice1712_capture = 1597 1580 { 1598 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1581 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1599 1582 SNDRV_PCM_INFO_BLOCK_TRANSFER | 1600 1583 SNDRV_PCM_INFO_MMAP_VALID), 1601 /* formats: */SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,1602 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,1603 /* rate_min: */4000,1604 /* rate_max: */48000,1605 /* channels_min: */1,1606 /* channels_max: */2,1607 /* buffer_bytes_max: */(64*1024),1608 /* period_bytes_min: */64,1609 /* period_bytes_max: */(64*1024),1610 /* periods_min: */1,1611 /* periods_max: */1024,1612 /* fifo_size: */0,1584 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, 1585 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 1586 .rate_min = 4000, 1587 .rate_max = 48000, 1588 .channels_min = 1, 1589 .channels_max = 2, 1590 .buffer_bytes_max = (64*1024), 1591 .period_bytes_min = 64, 1592 .period_bytes_max = (64*1024), 1593 .periods_min = 1, 1594 .periods_max = 1024, 1595 .fifo_size = 0, 1613 1596 }; 1614 #else1615 static snd_pcm_hardware_t snd_ice1712_playback =1616 {1617 info: (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1618 SNDRV_PCM_INFO_BLOCK_TRANSFER |1619 SNDRV_PCM_INFO_MMAP_VALID |1620 SNDRV_PCM_INFO_PAUSE),1621 formats: SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,1622 rates: SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,1623 rate_min: 4000,1624 rate_max: 48000,1625 channels_min: 1,1626 channels_max: 2,1627 buffer_bytes_max: (64*1024),1628 period_bytes_min: 64,1629 period_bytes_max: (64*1024),1630 periods_min: 1,1631 periods_max: 1024,1632 fifo_size: 0,1633 };1634 1635 static snd_pcm_hardware_t snd_ice1712_playback_ds =1636 {1637 info: (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1638 SNDRV_PCM_INFO_BLOCK_TRANSFER |1639 SNDRV_PCM_INFO_MMAP_VALID |1640 SNDRV_PCM_INFO_PAUSE),1641 formats: SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,1642 rates: SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,1643 rate_min: 4000,1644 rate_max: 48000,1645 channels_min: 1,1646 channels_max: 2,1647 buffer_bytes_max: (128*1024),1648 period_bytes_min: 64,1649 period_bytes_max: (128*1024),1650 periods_min: 2,1651 periods_max: 2,1652 fifo_size: 0,1653 };1654 1655 static snd_pcm_hardware_t snd_ice1712_capture =1656 {1657 info: (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1658 SNDRV_PCM_INFO_BLOCK_TRANSFER |1659 SNDRV_PCM_INFO_MMAP_VALID),1660 formats: SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,1661 rates: SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,1662 rate_min: 4000,1663 rate_max: 48000,1664 channels_min: 1,1665 channels_max: 2,1666 buffer_bytes_max: (64*1024),1667 period_bytes_min: 64,1668 period_bytes_max: (64*1024),1669 periods_min: 1,1670 periods_max: 1024,1671 fifo_size: 0,1672 };1673 #endif1674 1597 1675 1598 static int snd_ice1712_playback_open(snd_pcm_substream_t * substream) … … 1744 1667 } 1745 1668 1746 #ifdef TARGET_OS21747 1669 static snd_pcm_ops_t snd_ice1712_playback_ops = { 1748 snd_ice1712_playback_open,1749 snd_ice1712_playback_close,1750 snd_pcm_lib_ioctl,1751 snd_ice1712_hw_params,1752 snd_ice1712_hw_free,1753 snd_ice1712_playback_prepare,1754 snd_ice1712_playback_trigger,1755 snd_ice1712_playback_pointer,0,01670 .open = snd_ice1712_playback_open, 1671 .close = snd_ice1712_playback_close, 1672 .ioctl = snd_pcm_lib_ioctl, 1673 .hw_params = snd_ice1712_hw_params, 1674 .hw_free = snd_ice1712_hw_free, 1675 .prepare = snd_ice1712_playback_prepare, 1676 .trigger = snd_ice1712_playback_trigger, 1677 .pointer = snd_ice1712_playback_pointer, 1756 1678 }; 1757 1679 1758 1680 static snd_pcm_ops_t snd_ice1712_playback_ds_ops = { 1759 snd_ice1712_playback_ds_open,1760 snd_ice1712_playback_ds_close,1761 snd_pcm_lib_ioctl,1762 snd_ice1712_hw_params,1763 snd_ice1712_hw_free,1764 snd_ice1712_playback_ds_prepare,1765 snd_ice1712_playback_ds_trigger,1766 snd_ice1712_playback_ds_pointer,0,01681 .open = snd_ice1712_playback_ds_open, 1682 .close = snd_ice1712_playback_ds_close, 1683 .ioctl = snd_pcm_lib_ioctl, 1684 .hw_params = snd_ice1712_hw_params, 1685 .hw_free = snd_ice1712_hw_free, 1686 .prepare = snd_ice1712_playback_ds_prepare, 1687 .trigger = snd_ice1712_playback_ds_trigger, 1688 .pointer = snd_ice1712_playback_ds_pointer, 1767 1689 }; 1768 1690 1769 1691 static snd_pcm_ops_t snd_ice1712_capture_ops = { 1770 snd_ice1712_capture_open,1771 snd_ice1712_capture_close,1772 snd_pcm_lib_ioctl,1773 snd_ice1712_hw_params,1774 snd_ice1712_hw_free,1775 snd_ice1712_capture_prepare,1776 snd_ice1712_capture_trigger,1777 snd_ice1712_capture_pointer,0,01692 .open = snd_ice1712_capture_open, 1693 .close = snd_ice1712_capture_close, 1694 .ioctl = snd_pcm_lib_ioctl, 1695 .hw_params = snd_ice1712_hw_params, 1696 .hw_free = snd_ice1712_hw_free, 1697 .prepare = snd_ice1712_capture_prepare, 1698 .trigger = snd_ice1712_capture_trigger, 1699 .pointer = snd_ice1712_capture_pointer, 1778 1700 }; 1779 #else1780 static snd_pcm_ops_t snd_ice1712_playback_ops = {1781 open: snd_ice1712_playback_open,1782 close: snd_ice1712_playback_close,1783 ioctl: snd_pcm_lib_ioctl,1784 hw_params: snd_ice1712_hw_params,1785 hw_free: snd_ice1712_hw_free,1786 prepare: snd_ice1712_playback_prepare,1787 trigger: snd_ice1712_playback_trigger,1788 pointer: snd_ice1712_playback_pointer,1789 };1790 1791 static snd_pcm_ops_t snd_ice1712_playback_ds_ops = {1792 open: snd_ice1712_playback_ds_open,1793 close: snd_ice1712_playback_ds_close,1794 ioctl: snd_pcm_lib_ioctl,1795 hw_params: snd_ice1712_hw_params,1796 hw_free: snd_ice1712_hw_free,1797 prepare: snd_ice1712_playback_ds_prepare,1798 trigger: snd_ice1712_playback_ds_trigger,1799 pointer: snd_ice1712_playback_ds_pointer,1800 };1801 1802 static snd_pcm_ops_t snd_ice1712_capture_ops = {1803 open: snd_ice1712_capture_open,1804 close: snd_ice1712_capture_close,1805 ioctl: snd_pcm_lib_ioctl,1806 hw_params: snd_ice1712_hw_params,1807 hw_free: snd_ice1712_hw_free,1808 prepare: snd_ice1712_capture_prepare,1809 trigger: snd_ice1712_capture_trigger,1810 pointer: snd_ice1712_capture_pointer,1811 };1812 #endif1813 1701 1814 1702 static void snd_ice1712_pcm_free(snd_pcm_t *pcm) … … 1892 1780 #define RATES sizeof(rates) / sizeof(rates[0]) 1893 1781 1894 #ifdef TARGET_OS21895 1782 static snd_pcm_hw_constraint_list_t hw_constraints_rates = { 1896 RATES,1897 rates,1898 0,1783 .count = RATES, 1784 .list = rates, 1785 .mask = 0, 1899 1786 }; 1900 #else1901 static snd_pcm_hw_constraint_list_t hw_constraints_rates = {1902 count: RATES,1903 list: rates,1904 mask: 0,1905 };1906 #endif1907 1787 1908 1788 #if 0 … … 2099 1979 } 2100 1980 2101 #ifdef TARGET_OS22102 1981 static snd_pcm_hardware_t snd_ice1712_playback_pro = 2103 1982 { 2104 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1983 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 2105 1984 SNDRV_PCM_INFO_BLOCK_TRANSFER | 2106 1985 SNDRV_PCM_INFO_MMAP_VALID | 2107 1986 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_SYNC_START), 2108 /* formats: */SNDRV_PCM_FMTBIT_S32_LE,2109 /* rates: */SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_96000,2110 /* rate_min: */4000,2111 /* rate_max: */96000,2112 /* channels_min: */10,2113 /* channels_max: */10,2114 /* buffer_bytes_max: */(256*1024),2115 /* period_bytes_min: */10 * 4 * 2,2116 /* period_bytes_max: */131040,2117 /* periods_min: */1,2118 /* periods_max: */1024,2119 /* fifo_size: */0,1987 .formats = SNDRV_PCM_FMTBIT_S32_LE, 1988 .rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_96000, 1989 .rate_min = 4000, 1990 .rate_max = 96000, 1991 .channels_min = 10, 1992 .channels_max = 10, 1993 .buffer_bytes_max = (256*1024), 1994 .period_bytes_min = 10 * 4 * 2, 1995 .period_bytes_max = 131040, 1996 .periods_min = 1, 1997 .periods_max = 1024, 1998 .fifo_size = 0, 2120 1999 }; 2121 2000 2122 2001 static snd_pcm_hardware_t snd_ice1712_capture_pro = 2123 2002 { 2124 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |2003 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 2125 2004 SNDRV_PCM_INFO_BLOCK_TRANSFER | 2126 2005 SNDRV_PCM_INFO_MMAP_VALID | 2127 2006 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_SYNC_START), 2128 /* formats: */SNDRV_PCM_FMTBIT_S32_LE,2129 /* rates: */SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_96000,2130 /* rate_min: */4000,2131 /* rate_max: */96000,2132 /* channels_min: */12,2133 /* channels_max: */12,2134 /* buffer_bytes_max: */(256*1024),2135 /* period_bytes_min: */12 * 4 * 2,2136 /* period_bytes_max: */131040,2137 /* periods_min: */1,2138 /* periods_max: */1024,2139 /* fifo_size: */0,2007 .formats = SNDRV_PCM_FMTBIT_S32_LE, 2008 .rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_96000, 2009 .rate_min = 4000, 2010 .rate_max = 96000, 2011 .channels_min = 12, 2012 .channels_max = 12, 2013 .buffer_bytes_max = (256*1024), 2014 .period_bytes_min = 12 * 4 * 2, 2015 .period_bytes_max = 131040, 2016 .periods_min = 1, 2017 .periods_max = 1024, 2018 .fifo_size = 0, 2140 2019 }; 2141 #else2142 static snd_pcm_hardware_t snd_ice1712_playback_pro =2143 {2144 info: (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |2145 SNDRV_PCM_INFO_BLOCK_TRANSFER |2146 SNDRV_PCM_INFO_MMAP_VALID |2147 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_SYNC_START),2148 formats: SNDRV_PCM_FMTBIT_S32_LE,2149 rates: SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_96000,2150 rate_min: 4000,2151 rate_max: 96000,2152 channels_min: 10,2153 channels_max: 10,2154 buffer_bytes_max: (256*1024),2155 period_bytes_min: 10 * 4 * 2,2156 period_bytes_max: 131040,2157 periods_min: 1,2158 periods_max: 1024,2159 fifo_size: 0,2160 };2161 2162 static snd_pcm_hardware_t snd_ice1712_capture_pro =2163 {2164 info: (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |2165 SNDRV_PCM_INFO_BLOCK_TRANSFER |2166 SNDRV_PCM_INFO_MMAP_VALID |2167 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_SYNC_START),2168 formats: SNDRV_PCM_FMTBIT_S32_LE,2169 rates: SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_96000,2170 rate_min: 4000,2171 rate_max: 96000,2172 channels_min: 12,2173 channels_max: 12,2174 buffer_bytes_max: (256*1024),2175 period_bytes_min: 12 * 4 * 2,2176 period_bytes_max: 131040,2177 periods_min: 1,2178 periods_max: 1024,2179 fifo_size: 0,2180 };2181 #endif2182 2020 2183 2021 static int snd_ice1712_playback_pro_open(snd_pcm_substream_t * substream) … … 2238 2076 } 2239 2077 2240 #ifdef TARGET_OS22241 2078 static snd_pcm_ops_t snd_ice1712_playback_pro_ops = { 2242 snd_ice1712_playback_pro_open,2243 snd_ice1712_playback_pro_close,2244 snd_pcm_lib_ioctl,2245 snd_ice1712_hw_params,2246 snd_ice1712_hw_free,2247 snd_ice1712_playback_pro_prepare,2248 snd_ice1712_pro_trigger,2249 snd_ice1712_playback_pro_pointer,0,02079 .open = snd_ice1712_playback_pro_open, 2080 .close = snd_ice1712_playback_pro_close, 2081 .ioctl = snd_pcm_lib_ioctl, 2082 .hw_params = snd_ice1712_hw_params, 2083 .hw_free = snd_ice1712_hw_free, 2084 .prepare = snd_ice1712_playback_pro_prepare, 2085 .trigger = snd_ice1712_pro_trigger, 2086 .pointer = snd_ice1712_playback_pro_pointer, 2250 2087 }; 2251 2088 2252 2089 static snd_pcm_ops_t snd_ice1712_capture_pro_ops = { 2253 snd_ice1712_capture_pro_open,2254 snd_ice1712_capture_pro_close,2255 snd_pcm_lib_ioctl,2256 snd_ice1712_hw_params,2257 snd_ice1712_hw_free,2258 snd_ice1712_capture_pro_prepare,2259 snd_ice1712_pro_trigger,2260 snd_ice1712_capture_pro_pointer,0,02090 .open = snd_ice1712_capture_pro_open, 2091 .close = snd_ice1712_capture_pro_close, 2092 .ioctl = snd_pcm_lib_ioctl, 2093 .hw_params = snd_ice1712_hw_params, 2094 .hw_free = snd_ice1712_hw_free, 2095 .prepare = snd_ice1712_capture_pro_prepare, 2096 .trigger = snd_ice1712_pro_trigger, 2097 .pointer = snd_ice1712_capture_pro_pointer, 2261 2098 }; 2262 #else2263 static snd_pcm_ops_t snd_ice1712_playback_pro_ops = {2264 open: snd_ice1712_playback_pro_open,2265 close: snd_ice1712_playback_pro_close,2266 ioctl: snd_pcm_lib_ioctl,2267 hw_params: snd_ice1712_hw_params,2268 hw_free: snd_ice1712_hw_free,2269 prepare: snd_ice1712_playback_pro_prepare,2270 trigger: snd_ice1712_pro_trigger,2271 pointer: snd_ice1712_playback_pro_pointer,2272 };2273 2274 static snd_pcm_ops_t snd_ice1712_capture_pro_ops = {2275 open: snd_ice1712_capture_pro_open,2276 close: snd_ice1712_capture_pro_close,2277 ioctl: snd_pcm_lib_ioctl,2278 hw_params: snd_ice1712_hw_params,2279 hw_free: snd_ice1712_hw_free,2280 prepare: snd_ice1712_capture_pro_prepare,2281 trigger: snd_ice1712_pro_trigger,2282 pointer: snd_ice1712_capture_pro_pointer,2283 };2284 #endif2285 2099 2286 2100 static int __devinit snd_ice1712_pcm_profi(ice1712_t * ice, int device, snd_pcm_t ** rpcm) … … 2716 2530 2717 2531 static snd_kcontrol_new_t snd_ice1712_eeprom __devinitdata = { 2718 #ifdef TARGET_OS2 2719 SNDRV_CTL_ELEM_IFACE_CARD,0,0, 2720 "ICE1712 EEPROM",0, 2721 SNDRV_CTL_ELEM_ACCESS_READ, 2722 snd_ice1712_eeprom_info, 2723 snd_ice1712_eeprom_get,0,0 2724 #else 2725 iface: SNDRV_CTL_ELEM_IFACE_CARD, 2726 name: "ICE1712 EEPROM", 2727 access: SNDRV_CTL_ELEM_ACCESS_READ, 2728 info: snd_ice1712_eeprom_info, 2729 get: snd_ice1712_eeprom_get 2730 #endif 2532 .iface = SNDRV_CTL_ELEM_IFACE_CARD, 2533 .name = "ICE1712 EEPROM", 2534 .access = SNDRV_CTL_ELEM_ACCESS_READ, 2535 .info = snd_ice1712_eeprom_info, 2536 .get = snd_ice1712_eeprom_get 2731 2537 }; 2732 2538 … … 2803 2609 static snd_kcontrol_new_t snd_ice1712_spdif_default __devinitdata = 2804 2610 { 2805 #ifdef TARGET_OS2 2806 SNDRV_CTL_ELEM_IFACE_PCM,0,0, 2807 SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),0,0, 2808 snd_ice1712_spdif_default_info, 2809 snd_ice1712_spdif_default_get, 2810 snd_ice1712_spdif_default_put,0 2811 #else 2812 iface: SNDRV_CTL_ELEM_IFACE_PCM, 2813 name: SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 2814 info: snd_ice1712_spdif_default_info, 2815 get: snd_ice1712_spdif_default_get, 2816 put: snd_ice1712_spdif_default_put 2817 #endif 2611 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2612 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 2613 .info = snd_ice1712_spdif_default_info, 2614 .get = snd_ice1712_spdif_default_get, 2615 .put = snd_ice1712_spdif_default_put 2818 2616 }; 2819 2617 … … 2887 2685 static snd_kcontrol_new_t snd_ice1712_spdif_maskc __devinitdata = 2888 2686 { 2889 #ifdef TARGET_OS2 2890 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 2891 SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),0, 2892 SNDRV_CTL_ELEM_ACCESS_READ, 2893 snd_ice1712_spdif_mask_info, 2894 snd_ice1712_spdif_maskc_get,0,0 2895 #else 2896 access: SNDRV_CTL_ELEM_ACCESS_READ, 2897 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 2898 name: SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK), 2899 info: snd_ice1712_spdif_mask_info, 2900 get: snd_ice1712_spdif_maskc_get, 2901 #endif 2687 .access = SNDRV_CTL_ELEM_ACCESS_READ, 2688 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2689 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK), 2690 .info = snd_ice1712_spdif_mask_info, 2691 .get = snd_ice1712_spdif_maskc_get, 2902 2692 }; 2903 2693 2904 2694 static snd_kcontrol_new_t snd_ice1712_spdif_maskp __devinitdata = 2905 2695 { 2906 #ifdef TARGET_OS2 2907 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 2908 SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK),0, 2909 SNDRV_CTL_ELEM_ACCESS_READ, 2910 snd_ice1712_spdif_mask_info, 2911 snd_ice1712_spdif_maskp_get,0,0 2912 #else 2913 access: SNDRV_CTL_ELEM_ACCESS_READ, 2914 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 2915 name: SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK), 2916 info: snd_ice1712_spdif_mask_info, 2917 get: snd_ice1712_spdif_maskp_get, 2918 #endif 2696 .access = SNDRV_CTL_ELEM_ACCESS_READ, 2697 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2698 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK), 2699 .info = snd_ice1712_spdif_mask_info, 2700 .get = snd_ice1712_spdif_maskp_get, 2919 2701 }; 2920 2702 … … 2989 2771 static snd_kcontrol_new_t snd_ice1712_spdif_stream __devinitdata = 2990 2772 { 2991 #ifdef TARGET_OS2 2992 SNDRV_CTL_ELEM_IFACE_PCM,0,0, 2993 SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),0, 2994 SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 2995 snd_ice1712_spdif_stream_info, 2996 snd_ice1712_spdif_stream_get, 2997 snd_ice1712_spdif_stream_put,0 2998 #else 2999 access: SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 3000 iface: SNDRV_CTL_ELEM_IFACE_PCM, 3001 name: SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), 3002 info: snd_ice1712_spdif_stream_info, 3003 get: snd_ice1712_spdif_stream_get, 3004 put: snd_ice1712_spdif_stream_put 3005 #endif 2773 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 2774 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2775 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), 2776 .info = snd_ice1712_spdif_stream_info, 2777 .get = snd_ice1712_spdif_stream_get, 2778 .put = snd_ice1712_spdif_stream_put 3006 2779 }; 3007 2780 3008 #ifdef TARGET_OS23009 2781 #define ICE1712_GPIO(xiface, xname, xindex, mask, invert, xaccess) \ 3010 { xiface, 0, 0, xname, 0, xaccess, snd_ice1712_gpio_info, \ 3011 snd_ice1712_gpio_get, snd_ice1712_gpio_put, \ 3012 mask | (invert << 24) } 3013 #else 3014 #define ICE1712_GPIO(xiface, xname, xindex, mask, invert, xaccess) \ 3015 { iface: xiface, name: xname, access: xaccess, info: snd_ice1712_gpio_info, \ 3016 get: snd_ice1712_gpio_get, put: snd_ice1712_gpio_put, \ 3017 private_value: mask | (invert << 24) } 3018 #endif 2782 { .iface = xiface, .name = xname, .access = xaccess, .info = snd_ice1712_gpio_info, \ 2783 .get = snd_ice1712_gpio_get, .put = snd_ice1712_gpio_put, \ 2784 .private_value = mask | (invert << 24) } 3019 2785 3020 2786 static int snd_ice1712_gpio_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 3110 2876 3111 2877 static snd_kcontrol_new_t snd_ice1712_pro_spdif_master __devinitdata = { 3112 #ifdef TARGET_OS2 3113 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 3114 "Multi Track IEC958 Master",0,0, 3115 snd_ice1712_pro_spdif_master_info, 3116 snd_ice1712_pro_spdif_master_get, 3117 snd_ice1712_pro_spdif_master_put,0 3118 #else 3119 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 3120 name: "Multi Track IEC958 Master", 3121 info: snd_ice1712_pro_spdif_master_info, 3122 get: snd_ice1712_pro_spdif_master_get, 3123 put: snd_ice1712_pro_spdif_master_put 3124 #endif 2878 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2879 .name = "Multi Track IEC958 Master", 2880 .info = snd_ice1712_pro_spdif_master_info, 2881 .get = snd_ice1712_pro_spdif_master_get, 2882 .put = snd_ice1712_pro_spdif_master_put 3125 2883 }; 3126 2884 … … 3269 3027 3270 3028 static snd_kcontrol_new_t snd_ice1712_mixer_pro_analog_route __devinitdata = { 3271 #ifdef TARGET_OS2 3272 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 3273 "H/W Playback Route",0,0, 3274 snd_ice1712_pro_route_info, 3275 snd_ice1712_pro_route_analog_get, 3276 snd_ice1712_pro_route_analog_put,0 3277 #else 3278 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 3279 name: "H/W Playback Route", 3280 info: snd_ice1712_pro_route_info, 3281 get: snd_ice1712_pro_route_analog_get, 3282 put: snd_ice1712_pro_route_analog_put, 3283 #endif 3029 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3030 .name = "H/W Playback Route", 3031 .info = snd_ice1712_pro_route_info, 3032 .get = snd_ice1712_pro_route_analog_get, 3033 .put = snd_ice1712_pro_route_analog_put, 3284 3034 }; 3285 3035 3286 3036 static snd_kcontrol_new_t snd_ice1712_mixer_pro_spdif_route __devinitdata = { 3287 #ifdef TARGET_OS2 3288 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 3289 "IEC958 Playback Route",0,0, 3290 snd_ice1712_pro_route_info, 3291 snd_ice1712_pro_route_spdif_get, 3292 snd_ice1712_pro_route_spdif_put,0 3293 #else 3294 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 3295 name: "IEC958 Playback Route", 3296 info: snd_ice1712_pro_route_info, 3297 get: snd_ice1712_pro_route_spdif_get, 3298 put: snd_ice1712_pro_route_spdif_put, 3299 #endif 3037 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3038 .name = "IEC958 Playback Route", 3039 .info = snd_ice1712_pro_route_info, 3040 .get = snd_ice1712_pro_route_spdif_get, 3041 .put = snd_ice1712_pro_route_spdif_put, 3300 3042 }; 3301 3043 … … 3335 3077 3336 3078 static snd_kcontrol_new_t snd_ice1712_mixer_pro_volume_rate __devinitdata = { 3337 #ifdef TARGET_OS2 3338 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 3339 "Multi Track Volume Rate",0,0, 3340 snd_ice1712_pro_volume_rate_info, 3341 snd_ice1712_pro_volume_rate_get, 3342 snd_ice1712_pro_volume_rate_put,0 3343 #else 3344 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 3345 name: "Multi Track Volume Rate", 3346 info: snd_ice1712_pro_volume_rate_info, 3347 get: snd_ice1712_pro_volume_rate_get, 3348 put: snd_ice1712_pro_volume_rate_put 3349 #endif 3079 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3080 .name = "Multi Track Volume Rate", 3081 .info = snd_ice1712_pro_volume_rate_info, 3082 .get = snd_ice1712_pro_volume_rate_get, 3083 .put = snd_ice1712_pro_volume_rate_put 3350 3084 }; 3351 3085 … … 3375 3109 3376 3110 static snd_kcontrol_new_t snd_ice1712_mixer_pro_peak __devinitdata = { 3377 #ifdef TARGET_OS2 3378 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 3379 "Multi Track Peak",0, 3380 SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 3381 snd_ice1712_pro_peak_info, 3382 snd_ice1712_pro_peak_get,0,0 3383 #else 3384 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 3385 name: "Multi Track Peak", 3386 access: SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 3387 info: snd_ice1712_pro_peak_info, 3388 get: snd_ice1712_pro_peak_get 3389 #endif 3111 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3112 .name = "Multi Track Peak", 3113 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 3114 .info = snd_ice1712_pro_peak_info, 3115 .get = snd_ice1712_pro_peak_get 3390 3116 }; 3391 3117 … … 3439 3165 3440 3166 static snd_kcontrol_new_t snd_ice1712_ewx_input_sense __devinitdata = { 3441 #ifdef TARGET_OS2 3442 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 3443 "Input Sensitivity Switch",0,0, 3444 snd_ice1712_ewx_io_sense_info, 3445 snd_ice1712_ewx_io_sense_get, 3446 snd_ice1712_ewx_io_sense_put, 3447 ICE1712_EWX2496_AIN_SEL, 3448 #else 3449 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 3450 name: "Input Sensitivity Switch", 3451 info: snd_ice1712_ewx_io_sense_info, 3452 get: snd_ice1712_ewx_io_sense_get, 3453 put: snd_ice1712_ewx_io_sense_put, 3454 private_value: ICE1712_EWX2496_AIN_SEL, 3455 #endif 3167 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3168 .name = "Input Sensitivity Switch", 3169 .info = snd_ice1712_ewx_io_sense_info, 3170 .get = snd_ice1712_ewx_io_sense_get, 3171 .put = snd_ice1712_ewx_io_sense_put, 3172 .private_value = ICE1712_EWX2496_AIN_SEL, 3456 3173 }; 3457 3174 3458 3175 static snd_kcontrol_new_t snd_ice1712_ewx_output_sense __devinitdata = { 3459 #ifdef TARGET_OS2 3460 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 3461 "Output Sensitivity Switch",0,0, 3462 snd_ice1712_ewx_io_sense_info, 3463 snd_ice1712_ewx_io_sense_get, 3464 snd_ice1712_ewx_io_sense_put, 3465 ICE1712_EWX2496_AOUT_SEL, 3466 #else 3467 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 3468 name: "Output Sensitivity Switch", 3469 info: snd_ice1712_ewx_io_sense_info, 3470 get: snd_ice1712_ewx_io_sense_get, 3471 put: snd_ice1712_ewx_io_sense_put, 3472 private_value: ICE1712_EWX2496_AOUT_SEL, 3473 #endif 3176 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3177 .name = "Output Sensitivity Switch", 3178 .info = snd_ice1712_ewx_io_sense_info, 3179 .get = snd_ice1712_ewx_io_sense_get, 3180 .put = snd_ice1712_ewx_io_sense_put, 3181 .private_value = ICE1712_EWX2496_AOUT_SEL, 3474 3182 }; 3475 3183 … … 3487 3195 if (snd_i2c_readbytes(ice->pcf8574[1], &data, 1) != 1) { 3488 3196 snd_i2c_unlock(ice->i2c); 3489 return -E REMOTE;3197 return -EIO; 3490 3198 } 3491 3199 snd_i2c_unlock(ice->i2c); … … 3503 3211 if (snd_i2c_readbytes(ice->pcf8574[1], &data, 1) != 1) { 3504 3212 snd_i2c_unlock(ice->i2c); 3505 return -E REMOTE;3213 return -EIO; 3506 3214 } 3507 3215 ndata = (data & ~ICE1712_EWS88MT_OUTPUT_SENSE) | (ucontrol->value.enumerated.item[0] ? ICE1712_EWS88MT_OUTPUT_SENSE : 0); 3508 3216 if (ndata != data && snd_i2c_sendbytes(ice->pcf8574[1], &ndata, 1) != 1) { 3509 3217 snd_i2c_unlock(ice->i2c); 3510 return -E REMOTE;3218 return -EIO; 3511 3219 } 3512 3220 snd_i2c_unlock(ice->i2c); … … 3525 3233 if (snd_i2c_readbytes(ice->pcf8574[0], &data, 1) != 1) { 3526 3234 snd_i2c_unlock(ice->i2c); 3527 return -E REMOTE;3235 return -EIO; 3528 3236 } 3529 3237 /* reversed; high = +4dBu, low = -10dBV */ … … 3543 3251 if (snd_i2c_readbytes(ice->pcf8574[0], &data, 1) != 1) { 3544 3252 snd_i2c_unlock(ice->i2c); 3545 return -E REMOTE;3253 return -EIO; 3546 3254 } 3547 3255 ndata = (data & ~(1 << channel)) | (ucontrol->value.enumerated.item[0] ? 0 : (1 << channel)); 3548 3256 if (ndata != data && snd_i2c_sendbytes(ice->pcf8574[0], &ndata, 1) != 1) { 3549 3257 snd_i2c_unlock(ice->i2c); 3550 return -E REMOTE;3258 return -EIO; 3551 3259 } 3552 3260 snd_i2c_unlock(ice->i2c); … … 3555 3263 3556 3264 static snd_kcontrol_new_t snd_ice1712_ews88mt_input_sense __devinitdata = { 3557 #ifdef TARGET_OS2 3558 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 3559 "Input Sensitivity Switch",0,0, 3560 snd_ice1712_ewx_io_sense_info, 3561 snd_ice1712_ews88mt_input_sense_get, 3562 snd_ice1712_ews88mt_input_sense_put,0 3563 #else 3564 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 3565 name: "Input Sensitivity Switch", 3566 info: snd_ice1712_ewx_io_sense_info, 3567 get: snd_ice1712_ews88mt_input_sense_get, 3568 put: snd_ice1712_ews88mt_input_sense_put, 3569 #endif 3265 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3266 .name = "Input Sensitivity Switch", 3267 .info = snd_ice1712_ewx_io_sense_info, 3268 .get = snd_ice1712_ews88mt_input_sense_get, 3269 .put = snd_ice1712_ews88mt_input_sense_put, 3570 3270 }; 3571 3271 3572 3272 static snd_kcontrol_new_t snd_ice1712_ews88mt_output_sense __devinitdata = { 3573 #ifdef TARGET_OS2 3574 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 3575 "Output Sensitivity Switch",0,0, 3576 snd_ice1712_ewx_io_sense_info, 3577 snd_ice1712_ews88mt_output_sense_get, 3578 snd_ice1712_ews88mt_output_sense_put,0 3579 #else 3580 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 3581 name: "Output Sensitivity Switch", 3582 info: snd_ice1712_ewx_io_sense_info, 3583 get: snd_ice1712_ews88mt_output_sense_get, 3584 put: snd_ice1712_ews88mt_output_sense_put, 3585 #endif 3273 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3274 .name = "Output Sensitivity Switch", 3275 .info = snd_ice1712_ewx_io_sense_info, 3276 .get = snd_ice1712_ews88mt_output_sense_get, 3277 .put = snd_ice1712_ews88mt_output_sense_put, 3586 3278 }; 3587 3279 … … 3610 3302 if (snd_i2c_readbytes(ice->pcf8575, data, 2) != 2) { 3611 3303 snd_i2c_unlock(ice->i2c); 3612 return -E REMOTE;3304 return -EIO; 3613 3305 } 3614 3306 snd_i2c_unlock(ice->i2c); … … 3631 3323 if (snd_i2c_readbytes(ice->pcf8575, data, 2) != 2) { 3632 3324 snd_i2c_unlock(ice->i2c); 3633 return -E REMOTE;3325 return -EIO; 3634 3326 } 3635 3327 ndata[shift >> 3] = data[shift >> 3] & ~(1 << (shift & 7)); … … 3644 3336 if (change && snd_i2c_sendbytes(ice->pcf8575, data, 2) != 2) { 3645 3337 snd_i2c_unlock(ice->i2c); 3646 return -E REMOTE;3338 return -EIO; 3647 3339 } 3648 3340 snd_i2c_unlock(ice->i2c); … … 3650 3342 } 3651 3343 3652 #ifdef TARGET_OS23653 3344 #define EWS88D_CONTROL(xiface, xname, xshift, xinvert, xaccess) \ 3654 { xiface,0,0,\ 3655 xname, 0,\ 3656 xaccess,\ 3657 snd_ice1712_ews88d_control_info,\ 3658 snd_ice1712_ews88d_control_get,\ 3659 snd_ice1712_ews88d_control_put,\ 3660 xshift | (xinvert << 8),\ 3661 } 3662 #else 3663 #define EWS88D_CONTROL(xiface, xname, xshift, xinvert, xaccess) \ 3664 { iface: xiface,\ 3665 name: xname,\ 3666 access: xaccess,\ 3667 info: snd_ice1712_ews88d_control_info,\ 3668 get: snd_ice1712_ews88d_control_get,\ 3669 put: snd_ice1712_ews88d_control_put,\ 3670 private_value: xshift | (xinvert << 8),\ 3671 } 3672 #endif 3345 { .iface = xiface,\ 3346 .name = xname,\ 3347 .access = xaccess,\ 3348 .info = snd_ice1712_ews88d_control_info,\ 3349 .get = snd_ice1712_ews88d_control_get,\ 3350 .put = snd_ice1712_ews88d_control_put,\ 3351 .private_value = xshift | (xinvert << 8),\ 3352 } 3673 3353 3674 3354 static snd_kcontrol_new_t snd_ice1712_ews88d_controls[] __devinitdata = { … … 3694 3374 if (snd_i2c_readbytes(ice->pcf8575, &byte, 1) != 1) { 3695 3375 snd_i2c_unlock(ice->i2c); 3696 return -E REMOTE;3376 return -EIO; 3697 3377 } 3698 3378 snd_i2c_unlock(ice->i2c); … … 3708 3388 if (snd_i2c_sendbytes(ice->pcf8575, bytes, 2) != 2) { 3709 3389 snd_i2c_unlock(ice->i2c); 3710 return -E REMOTE;3390 return -EIO; 3711 3391 } 3712 3392 snd_i2c_unlock(ice->i2c); … … 3761 3441 3762 3442 #define DMX6FIRE_CONTROL(xiface, xname, xshift, xinvert, xaccess) \ 3763 { iface:xiface,\3764 name:xname,\3765 access:xaccess,\3766 info:snd_ice1712_6fire_control_info,\3767 get:snd_ice1712_6fire_control_get,\3768 put:snd_ice1712_6fire_control_put,\3769 private_value:xshift | (xinvert << 8),\3443 { .iface = xiface,\ 3444 .name = xname,\ 3445 .access = xaccess,\ 3446 .info = snd_ice1712_6fire_control_info,\ 3447 .get = snd_ice1712_6fire_control_get,\ 3448 .put = snd_ice1712_6fire_control_put,\ 3449 .private_value = xshift | (xinvert << 8),\ 3770 3450 } 3771 3451 … … 4164 3844 /* second stage of initialization, analog parts and others */ 4165 3845 switch (ice->eeprom.subvendor) { 3846 case ICE1712_SUBDEVICE_EWS88MT: 3847 /* Check if the front module is connected */ 3848 if ((err = snd_ice1712_ews88mt_chip_select(ice, 0x0f)) < 0) 3849 return err; 3850 /* Fall through */ 4166 3851 case ICE1712_SUBDEVICE_DELTA66: 4167 3852 case ICE1712_SUBDEVICE_DELTA44: 4168 3853 case ICE1712_SUBDEVICE_AUDIOPHILE: 4169 3854 case ICE1712_SUBDEVICE_EWX2496: 4170 case ICE1712_SUBDEVICE_EWS88MT:4171 3855 case ICE1712_SUBDEVICE_DMX6FIRE: 4172 3856 snd_ice1712_ak4524_init(ice); … … 4408 4092 __hw_end: 4409 4093 snd_ice1712_proc_done(ice); 4410 synchronize_irq();4411 if (ice->irq)4094 if (ice->irq >= 0) { 4095 synchronize_irq(ice->irq); 4412 4096 free_irq(ice->irq, (void *) ice); 4097 } 4413 4098 if (ice->res_port) { 4414 4099 release_resource(ice->res_port); … … 4444 4129 ice1712_t *ice; 4445 4130 int err; 4446 #ifdef TARGET_OS24447 4131 static snd_device_ops_t ops = { 4448 snd_ice1712_dev_free,0,0,04132 .dev_free = snd_ice1712_dev_free, 4449 4133 }; 4450 #else4451 static snd_device_ops_t ops = {4452 dev_free: snd_ice1712_dev_free,4453 };4454 #endif4455 4134 4456 4135 *r_ice1712 = NULL; … … 4487 4166 pci_write_config_word(ice->pci, 0x42, 0x0006); 4488 4167 snd_ice1712_proc_init(ice); 4489 synchronize_irq( );4168 synchronize_irq(pci->irq); 4490 4169 4491 4170 if ((ice->res_port = request_region(ice->port, 32, "ICE1712 - Controller")) == NULL) { … … 4666 4345 } 4667 4346 4668 #ifdef TARGET_OS24669 4347 static struct pci_driver driver = { 4670 0,0,"ICE1712",4671 snd_ice1712_ids,4672 snd_ice1712_probe,4673 snd_ice1712_remove,0,04348 .name = "ICE1712", 4349 .id_table = snd_ice1712_ids, 4350 .probe = snd_ice1712_probe, 4351 .remove = __devexit_p(snd_ice1712_remove), 4674 4352 }; 4675 #else4676 static struct pci_driver driver = {4677 name: "ICE1712",4678 id_table: snd_ice1712_ids,4679 probe: snd_ice1712_probe,4680 remove: __devexit_p(snd_ice1712_remove),4681 };4682 #endif4683 4353 4684 4354 static int __init alsa_card_ice1712_init(void)  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/intel8x0.c
r206 r210 3272 3272 3273 3273 static struct pci_driver joystick_driver = { 3274 0, 0, 0, 3275 /* name: */ "Intel ICH Joystick", 3276 /* id_table: */ snd_intel8x0_joystick_ids, 3277 /* probe: */ snd_intel8x0_joystick_probe, 3278 0,0,0 3274 .name = "Intel ICH Joystick", 3275 .id_table = snd_intel8x0_joystick_ids, 3276 .probe = snd_intel8x0_joystick_probe, 3279 3277 }; 3280 3278 static int have_joystick;  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/korg1212/korg1212.c
r207 r210 30 30 #include <sound/control.h> 31 31 #include <sound/pcm.h> 32 #include <sound/pcm_params.h> 32 33 #define SNDRV_GET_ID 33 34 #include <sound/initval.h> … … 1162 1163 static snd_pcm_hardware_t snd_korg1212_playback_info = 1163 1164 { 1164 info:(SNDRV_PCM_INFO_MMAP |1165 .info = (SNDRV_PCM_INFO_MMAP | 1165 1166 SNDRV_PCM_INFO_MMAP_VALID | 1166 1167 SNDRV_PCM_INFO_INTERLEAVED), 1167 formats:SNDRV_PCM_FMTBIT_S16_LE,1168 rates:(SNDRV_PCM_RATE_44100 |1168 .formats = SNDRV_PCM_FMTBIT_S16_LE, 1169 .rates = (SNDRV_PCM_RATE_44100 | 1169 1170 SNDRV_PCM_RATE_48000), 1170 rate_min:44100,1171 rate_max:48000,1172 channels_min:K1212_CHANNELS,1173 channels_max:K1212_CHANNELS,1174 buffer_bytes_max:K1212_BUF_SIZE,1175 period_bytes_min:K1212_PERIOD_BYTES,1176 period_bytes_max:K1212_PERIOD_BYTES,1177 periods_min:K1212_PERIODS,1178 periods_max:K1212_PERIODS,1179 fifo_size:0,1171 .rate_min = 44100, 1172 .rate_max = 48000, 1173 .channels_min = K1212_CHANNELS, 1174 .channels_max = K1212_CHANNELS, 1175 .buffer_bytes_max = K1212_BUF_SIZE, 1176 .period_bytes_min = K1212_PERIOD_BYTES, 1177 .period_bytes_max = K1212_PERIOD_BYTES, 1178 .periods_min = K1212_PERIODS, 1179 .periods_max = K1212_PERIODS, 1180 .fifo_size = 0, 1180 1181 }; 1181 1182 1182 1183 static snd_pcm_hardware_t snd_korg1212_capture_info = 1183 1184 { 1184 info:(SNDRV_PCM_INFO_MMAP |1185 .info = (SNDRV_PCM_INFO_MMAP | 1185 1186 SNDRV_PCM_INFO_MMAP_VALID | 1186 1187 SNDRV_PCM_INFO_INTERLEAVED), 1187 formats:SNDRV_PCM_FMTBIT_S16_LE,1188 rates:(SNDRV_PCM_RATE_44100 |1188 .formats = SNDRV_PCM_FMTBIT_S16_LE, 1189 .rates = (SNDRV_PCM_RATE_44100 | 1189 1190 SNDRV_PCM_RATE_48000), 1190 rate_min:44100,1191 rate_max:48000,1192 channels_min:K1212_CHANNELS,1193 channels_max:K1212_CHANNELS,1194 buffer_bytes_max:K1212_BUF_SIZE,1195 period_bytes_min:K1212_PERIOD_BYTES,1196 period_bytes_max:K1212_PERIOD_BYTES,1197 periods_min:K1212_PERIODS,1198 periods_max:K1212_PERIODS,1199 fifo_size:0,1191 .rate_min = 44100, 1192 .rate_max = 48000, 1193 .channels_min = K1212_CHANNELS, 1194 .channels_max = K1212_CHANNELS, 1195 .buffer_bytes_max = K1212_BUF_SIZE, 1196 .period_bytes_min = K1212_PERIOD_BYTES, 1197 .period_bytes_max = K1212_PERIOD_BYTES, 1198 .periods_min = K1212_PERIODS, 1199 .periods_max = K1212_PERIODS, 1200 .fifo_size = 0, 1200 1201 }; 1201 1202 … … 1216 1217 1217 1218 static snd_pcm_hw_constraint_list_t hw_constraints_period_bytes = { 1218 count:PERIOD_BYTES,1219 list:period_bytes,1220 mask:01219 .count = PERIOD_BYTES, 1220 .list = period_bytes, 1221 .mask = 0 1221 1222 }; 1222 1223 … … 1504 1505 1505 1506 static snd_pcm_ops_t snd_korg1212_playback_ops = { 1506 open:snd_korg1212_playback_open,1507 close:snd_korg1212_playback_close,1508 ioctl:snd_korg1212_ioctl,1509 hw_params:snd_korg1212_hw_params,1510 prepare:snd_korg1212_prepare,1511 trigger:snd_korg1212_trigger,1512 pointer:snd_korg1212_pointer,1513 copy:snd_korg1212_playback_copy,1514 silence:snd_korg1212_playback_silence,1507 .open = snd_korg1212_playback_open, 1508 .close = snd_korg1212_playback_close, 1509 .ioctl = snd_korg1212_ioctl, 1510 .hw_params = snd_korg1212_hw_params, 1511 .prepare = snd_korg1212_prepare, 1512 .trigger = snd_korg1212_trigger, 1513 .pointer = snd_korg1212_pointer, 1514 .copy = snd_korg1212_playback_copy, 1515 .silence = snd_korg1212_playback_silence, 1515 1516 }; 1516 1517 1517 1518 static snd_pcm_ops_t snd_korg1212_capture_ops = { 1518 open:snd_korg1212_capture_open,1519 close:snd_korg1212_capture_close,1520 ioctl:snd_korg1212_ioctl,1521 hw_params:snd_korg1212_hw_params,1522 prepare:snd_korg1212_prepare,1523 trigger:snd_korg1212_trigger,1524 pointer:snd_korg1212_pointer,1525 copy:snd_korg1212_capture_copy,1519 .open = snd_korg1212_capture_open, 1520 .close = snd_korg1212_capture_close, 1521 .ioctl = snd_korg1212_ioctl, 1522 .hw_params = snd_korg1212_hw_params, 1523 .prepare = snd_korg1212_prepare, 1524 .trigger = snd_korg1212_trigger, 1525 .pointer = snd_korg1212_pointer, 1526 .copy = snd_korg1212_capture_copy, 1526 1527 }; 1527 1528 … … 1803 1804 #define MON_MIXER(ord,c_name) \ 1804 1805 { \ 1805 access:SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE, \1806 iface:SNDRV_CTL_ELEM_IFACE_MIXER, \1807 name: c_name " Monitor Volume",\1808 info:snd_korg1212_control_volume_info, \1809 get:snd_korg1212_control_volume_get, \1810 put:snd_korg1212_control_volume_put, \1811 private_value:ord, \1806 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE, \ 1807 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ 1808 .name = c_name " Monitor Volume", \ 1809 .info = snd_korg1212_control_volume_info, \ 1810 .get = snd_korg1212_control_volume_get, \ 1811 .put = snd_korg1212_control_volume_put, \ 1812 .private_value = ord, \ 1812 1813 }, \ 1813 1814 { \ 1814 access:SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE, \1815 iface:SNDRV_CTL_ELEM_IFACE_MIXER, \1816 name: c_name " Monitor Route",\1817 info:snd_korg1212_control_route_info, \1818 get:snd_korg1212_control_route_get, \1819 put:snd_korg1212_control_route_put, \1820 private_value:ord, \1815 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE, \ 1816 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ 1817 .name = c_name " Monitor Route", \ 1818 .info = snd_korg1212_control_route_info, \ 1819 .get = snd_korg1212_control_route_get, \ 1820 .put = snd_korg1212_control_route_put, \ 1821 .private_value = ord, \ 1821 1822 }, \ 1822 1823 { \ 1823 access:SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE, \1824 iface:SNDRV_CTL_ELEM_IFACE_PCM, \1825 name: c_name " Monitor Phase Invert",\1826 info:snd_korg1212_control_phase_info, \1827 get:snd_korg1212_control_phase_get, \1828 put:snd_korg1212_control_phase_put, \1829 private_value:ord, \1824 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE, \ 1825 .iface = SNDRV_CTL_ELEM_IFACE_PCM, \ 1826 .name = c_name " Monitor Phase Invert", \ 1827 .info = snd_korg1212_control_phase_info, \ 1828 .get = snd_korg1212_control_phase_get, \ 1829 .put = snd_korg1212_control_phase_put, \ 1830 .private_value = ord, \ 1830 1831 } 1831 1832 … … 1836 1837 MON_MIXER(4, "ADAT-5"), MON_MIXER(5, "ADAT-6"), MON_MIXER(6, "ADAT-7"), MON_MIXER(7, "ADAT-8"), 1837 1838 { 1838 access:SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE,1839 iface:SNDRV_CTL_ELEM_IFACE_PCM,1840 name:"Sync Source",1841 info:snd_korg1212_control_sync_info,1842 get:snd_korg1212_control_sync_get,1843 put:snd_korg1212_control_sync_put,1839 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE, 1840 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1841 .name = "Sync Source", 1842 .info = snd_korg1212_control_sync_info, 1843 .get = snd_korg1212_control_sync_get, 1844 .put = snd_korg1212_control_sync_put, 1844 1845 }, 1845 1846 { 1846 access:SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE,1847 iface:SNDRV_CTL_ELEM_IFACE_MIXER,1848 name:"ADC Attenuation",1849 info:snd_korg1212_control_analog_info,1850 get:snd_korg1212_control_analog_get,1851 put:snd_korg1212_control_analog_put,1847 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE, 1848 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1849 .name = "ADC Attenuation", 1850 .info = snd_korg1212_control_analog_info, 1851 .get = snd_korg1212_control_analog_get, 1852 .put = snd_korg1212_control_analog_put, 1852 1853 } 1853 1854 }; … … 2305 2306 2306 2307 static struct pci_driver driver = { 2307 name:"korg1212",2308 id_table:snd_korg1212_ids,2309 probe:snd_korg1212_probe,2310 remove:__devexit_p(snd_korg1212_remove),2308 .name = "korg1212", 2309 .id_table = snd_korg1212_ids, 2310 .probe = snd_korg1212_probe, 2311 .remove = __devexit_p(snd_korg1212_remove), 2311 2312 }; 2312 2313  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/rme96.c
r207 r210 34 34 #include <sound/control.h> 35 35 #include <sound/pcm.h> 36 #include <sound/pcm_params.h> 36 37 #include <sound/asoundef.h> 37 38 #define SNDRV_GET_ID … … 374 375 * Digital output capabilites (S/PDIF) 375 376 */ 376 #ifdef TARGET_OS2377 377 static snd_pcm_hardware_t snd_rme96_playback_spdif_info = 378 378 { 379 /* info: */(SNDRV_PCM_INFO_MMAP |379 .info = (SNDRV_PCM_INFO_MMAP | 380 380 SNDRV_PCM_INFO_MMAP_VALID | 381 381 SNDRV_PCM_INFO_INTERLEAVED | 382 382 SNDRV_PCM_INFO_PAUSE), 383 /* formats: */(SNDRV_PCM_FMTBIT_S16_LE |383 .formats = (SNDRV_PCM_FMTBIT_S16_LE | 384 384 SNDRV_PCM_FMTBIT_S32_LE), 385 /* rates: */(SNDRV_PCM_RATE_32000 |385 .rates = (SNDRV_PCM_RATE_32000 | 386 386 SNDRV_PCM_RATE_44100 | 387 387 SNDRV_PCM_RATE_48000 | … … 389 389 SNDRV_PCM_RATE_88200 | 390 390 SNDRV_PCM_RATE_96000), 391 /* rate_min: */32000,392 /* rate_max: */96000,393 /* channels_min: */2,394 /* channels_max: */2,395 /* buffer_bytes_max: */RME96_BUFFER_SIZE,396 /* period_bytes_min: */RME96_SMALL_BLOCK_SIZE,397 /* period_bytes_max: */RME96_LARGE_BLOCK_SIZE,398 /* periods_min: */RME96_BUFFER_SIZE / RME96_LARGE_BLOCK_SIZE,399 /* periods_max: */RME96_BUFFER_SIZE / RME96_SMALL_BLOCK_SIZE,400 /* fifo_size: */0,391 .rate_min = 32000, 392 .rate_max = 96000, 393 .channels_min = 2, 394 .channels_max = 2, 395 .buffer_bytes_max = RME96_BUFFER_SIZE, 396 .period_bytes_min = RME96_SMALL_BLOCK_SIZE, 397 .period_bytes_max = RME96_LARGE_BLOCK_SIZE, 398 .periods_min = RME96_BUFFER_SIZE / RME96_LARGE_BLOCK_SIZE, 399 .periods_max = RME96_BUFFER_SIZE / RME96_SMALL_BLOCK_SIZE, 400 .fifo_size = 0, 401 401 }; 402 402 … … 406 406 static snd_pcm_hardware_t snd_rme96_capture_spdif_info = 407 407 { 408 /* info: */(SNDRV_PCM_INFO_MMAP |408 .info = (SNDRV_PCM_INFO_MMAP | 409 409 SNDRV_PCM_INFO_MMAP_VALID | 410 410 SNDRV_PCM_INFO_INTERLEAVED | 411 411 SNDRV_PCM_INFO_PAUSE), 412 /* formats: */(SNDRV_PCM_FMTBIT_S16_LE |412 .formats = (SNDRV_PCM_FMTBIT_S16_LE | 413 413 SNDRV_PCM_FMTBIT_S32_LE), 414 /* rates: */(SNDRV_PCM_RATE_32000 |414 .rates = (SNDRV_PCM_RATE_32000 | 415 415 SNDRV_PCM_RATE_44100 | 416 416 SNDRV_PCM_RATE_48000 | … … 418 418 SNDRV_PCM_RATE_88200 | 419 419 SNDRV_PCM_RATE_96000), 420 /* rate_min: */32000,421 /* rate_max: */96000,422 /* channels_min: */2,423 /* channels_max: */2,424 /* buffer_bytes_max: */RME96_BUFFER_SIZE,425 /* period_bytes_min: */RME96_SMALL_BLOCK_SIZE,426 /* period_bytes_max: */RME96_LARGE_BLOCK_SIZE,427 /* periods_min: */RME96_BUFFER_SIZE / RME96_LARGE_BLOCK_SIZE,428 /* periods_max: */RME96_BUFFER_SIZE / RME96_SMALL_BLOCK_SIZE,429 /* fifo_size: */0,420 .rate_min = 32000, 421 .rate_max = 96000, 422 .channels_min = 2, 423 .channels_max = 2, 424 .buffer_bytes_max = RME96_BUFFER_SIZE, 425 .period_bytes_min = RME96_SMALL_BLOCK_SIZE, 426 .period_bytes_max = RME96_LARGE_BLOCK_SIZE, 427 .periods_min = RME96_BUFFER_SIZE / RME96_LARGE_BLOCK_SIZE, 428 .periods_max = RME96_BUFFER_SIZE / RME96_SMALL_BLOCK_SIZE, 429 .fifo_size = 0, 430 430 }; 431 431 … … 435 435 static snd_pcm_hardware_t snd_rme96_playback_adat_info = 436 436 { 437 /* info: */(SNDRV_PCM_INFO_MMAP |437 .info = (SNDRV_PCM_INFO_MMAP | 438 438 SNDRV_PCM_INFO_MMAP_VALID | 439 439 SNDRV_PCM_INFO_INTERLEAVED | 440 440 SNDRV_PCM_INFO_PAUSE), 441 /* formats: */ SNDRV_PCM_FMTBIT_S16_LE, 442 /* rates: */ (SNDRV_PCM_RATE_44100 | 441 .formats = (SNDRV_PCM_FMTBIT_S16_LE | 442 SNDRV_PCM_FMTBIT_S32_LE), 443 .rates = (SNDRV_PCM_RATE_44100 | 443 444 SNDRV_PCM_RATE_48000), 444 /* rate_min: */44100,445 /* rate_max: */48000,446 /* channels_min: */8,447 /* channels_max: */8,448 /* buffer_bytes_max: */RME96_BUFFER_SIZE,449 /* period_bytes_min: */RME96_SMALL_BLOCK_SIZE,450 /* period_bytes_max: */RME96_LARGE_BLOCK_SIZE,451 /* periods_min: */RME96_BUFFER_SIZE / RME96_LARGE_BLOCK_SIZE,452 /* periods_max: */RME96_BUFFER_SIZE / RME96_SMALL_BLOCK_SIZE,453 /* fifo_size: */0,445 .rate_min = 44100, 446 .rate_max = 48000, 447 .channels_min = 8, 448 .channels_max = 8, 449 .buffer_bytes_max = RME96_BUFFER_SIZE, 450 .period_bytes_min = RME96_SMALL_BLOCK_SIZE, 451 .period_bytes_max = RME96_LARGE_BLOCK_SIZE, 452 .periods_min = RME96_BUFFER_SIZE / RME96_LARGE_BLOCK_SIZE, 453 .periods_max = RME96_BUFFER_SIZE / RME96_SMALL_BLOCK_SIZE, 454 .fifo_size = 0, 454 455 }; 455 456 … … 459 460 static snd_pcm_hardware_t snd_rme96_capture_adat_info = 460 461 { 461 /* info: */(SNDRV_PCM_INFO_MMAP |462 .info = (SNDRV_PCM_INFO_MMAP | 462 463 SNDRV_PCM_INFO_MMAP_VALID | 463 464 SNDRV_PCM_INFO_INTERLEAVED | 464 465 SNDRV_PCM_INFO_PAUSE), 465 /* formats: */ SNDRV_PCM_FMTBIT_S16_LE, 466 /* rates: */ (SNDRV_PCM_RATE_44100 | 466 .formats = (SNDRV_PCM_FMTBIT_S16_LE | 467 SNDRV_PCM_FMTBIT_S32_LE), 468 .rates = (SNDRV_PCM_RATE_44100 | 467 469 SNDRV_PCM_RATE_48000), 468 /* rate_min: */44100,469 /* rate_max: */48000,470 /* channels_min: */8,471 /* channels_max: */8,472 /* buffer_bytes_max: */RME96_BUFFER_SIZE,473 /* period_bytes_min: */RME96_SMALL_BLOCK_SIZE,474 /* period_bytes_max: */RME96_LARGE_BLOCK_SIZE,475 /* periods_min: */RME96_BUFFER_SIZE / RME96_LARGE_BLOCK_SIZE,476 /* periods_max: */RME96_BUFFER_SIZE / RME96_SMALL_BLOCK_SIZE,477 /* fifo_size: */0,470 .rate_min = 44100, 471 .rate_max = 48000, 472 .channels_min = 8, 473 .channels_max = 8, 474 .buffer_bytes_max = RME96_BUFFER_SIZE, 475 .period_bytes_min = RME96_SMALL_BLOCK_SIZE, 476 .period_bytes_max = RME96_LARGE_BLOCK_SIZE, 477 .periods_min = RME96_BUFFER_SIZE / RME96_LARGE_BLOCK_SIZE, 478 .periods_max = RME96_BUFFER_SIZE / RME96_SMALL_BLOCK_SIZE, 479 .fifo_size = 0, 478 480 }; 479 #else480 static snd_pcm_hardware_t snd_rme96_playback_spdif_info =481 {482 info: (SNDRV_PCM_INFO_MMAP |483 SNDRV_PCM_INFO_MMAP_VALID |484 SNDRV_PCM_INFO_INTERLEAVED |485 SNDRV_PCM_INFO_PAUSE),486 formats: (SNDRV_PCM_FMTBIT_S16_LE |487 SNDRV_PCM_FMTBIT_S32_LE),488 rates: (SNDRV_PCM_RATE_32000 |489 SNDRV_PCM_RATE_44100 |490 SNDRV_PCM_RATE_48000 |491 SNDRV_PCM_RATE_64000 |492 SNDRV_PCM_RATE_88200 |493 SNDRV_PCM_RATE_96000),494 rate_min: 32000,495 rate_max: 96000,496 channels_min: 2,497 channels_max: 2,498 buffer_bytes_max: RME96_BUFFER_SIZE,499 period_bytes_min: RME96_SMALL_BLOCK_SIZE,500 period_bytes_max: RME96_LARGE_BLOCK_SIZE,501 periods_min: RME96_BUFFER_SIZE / RME96_LARGE_BLOCK_SIZE,502 periods_max: RME96_BUFFER_SIZE / RME96_SMALL_BLOCK_SIZE,503 fifo_size: 0,504 };505 506 /*507 * Digital input capabilites (S/PDIF)508 */509 static snd_pcm_hardware_t snd_rme96_capture_spdif_info =510 {511 info: (SNDRV_PCM_INFO_MMAP |512 SNDRV_PCM_INFO_MMAP_VALID |513 SNDRV_PCM_INFO_INTERLEAVED |514 SNDRV_PCM_INFO_PAUSE),515 formats: (SNDRV_PCM_FMTBIT_S16_LE |516 SNDRV_PCM_FMTBIT_S32_LE),517 rates: (SNDRV_PCM_RATE_32000 |518 SNDRV_PCM_RATE_44100 |519 SNDRV_PCM_RATE_48000 |520 SNDRV_PCM_RATE_64000 |521 SNDRV_PCM_RATE_88200 |522 SNDRV_PCM_RATE_96000),523 rate_min: 32000,524 rate_max: 96000,525 channels_min: 2,526 channels_max: 2,527 buffer_bytes_max: RME96_BUFFER_SIZE,528 period_bytes_min: RME96_SMALL_BLOCK_SIZE,529 period_bytes_max: RME96_LARGE_BLOCK_SIZE,530 periods_min: RME96_BUFFER_SIZE / RME96_LARGE_BLOCK_SIZE,531 periods_max: RME96_BUFFER_SIZE / RME96_SMALL_BLOCK_SIZE,532 fifo_size: 0,533 };534 535 /*536 * Digital output capabilites (ADAT)537 */538 static snd_pcm_hardware_t snd_rme96_playback_adat_info =539 {540 info: (SNDRV_PCM_INFO_MMAP |541 SNDRV_PCM_INFO_MMAP_VALID |542 SNDRV_PCM_INFO_INTERLEAVED |543 SNDRV_PCM_INFO_PAUSE),544 formats: SNDRV_PCM_FMTBIT_S16_LE,545 rates: (SNDRV_PCM_RATE_44100 |546 SNDRV_PCM_RATE_48000),547 rate_min: 44100,548 rate_max: 48000,549 channels_min: 8,550 channels_max: 8,551 buffer_bytes_max: RME96_BUFFER_SIZE,552 period_bytes_min: RME96_SMALL_BLOCK_SIZE,553 period_bytes_max: RME96_LARGE_BLOCK_SIZE,554 periods_min: RME96_BUFFER_SIZE / RME96_LARGE_BLOCK_SIZE,555 periods_max: RME96_BUFFER_SIZE / RME96_SMALL_BLOCK_SIZE,556 fifo_size: 0,557 };558 559 /*560 * Digital input capabilites (ADAT)561 */562 static snd_pcm_hardware_t snd_rme96_capture_adat_info =563 {564 info: (SNDRV_PCM_INFO_MMAP |565 SNDRV_PCM_INFO_MMAP_VALID |566 SNDRV_PCM_INFO_INTERLEAVED |567 SNDRV_PCM_INFO_PAUSE),568 formats: SNDRV_PCM_FMTBIT_S16_LE,569 rates: (SNDRV_PCM_RATE_44100 |570 SNDRV_PCM_RATE_48000),571 rate_min: 44100,572 rate_max: 48000,573 channels_min: 8,574 channels_max: 8,575 buffer_bytes_max: RME96_BUFFER_SIZE,576 period_bytes_min: RME96_SMALL_BLOCK_SIZE,577 period_bytes_max: RME96_LARGE_BLOCK_SIZE,578 periods_min: RME96_BUFFER_SIZE / RME96_LARGE_BLOCK_SIZE,579 periods_max: RME96_BUFFER_SIZE / RME96_SMALL_BLOCK_SIZE,580 fifo_size: 0,581 };582 #endif583 481 584 482 /* … … 1253 1151 #define PERIOD_BYTES sizeof(period_bytes) / sizeof(period_bytes[0]) 1254 1152 1255 #ifdef TARGET_OS21256 1153 static snd_pcm_hw_constraint_list_t hw_constraints_period_bytes = { 1257 PERIOD_BYTES,1258 period_bytes,1259 01154 .count = PERIOD_BYTES, 1155 .list = period_bytes, 1156 .mask = 0 1260 1157 }; 1261 #else1262 static snd_pcm_hw_constraint_list_t hw_constraints_period_bytes = {1263 count: PERIOD_BYTES,1264 list: period_bytes,1265 mask: 01266 };1267 #endif1268 1158 1269 1159 static int … … 1604 1494 } 1605 1495 1606 #ifdef TARGET_OS21607 1496 static snd_pcm_ops_t snd_rme96_playback_spdif_ops = { 1608 /* open: */snd_rme96_playback_spdif_open,1609 /* close: */snd_rme96_playback_close,1610 /* ioctl: */snd_pcm_lib_ioctl,1611 /* hw_params:*/snd_rme96_playback_hw_params,1612 /* hw_free: */snd_rme96_playback_hw_free,1613 /* prepare: */snd_rme96_playback_prepare,1614 /* trigger: */snd_rme96_playback_trigger,1615 /* pointer: */snd_rme96_playback_pointer,1616 /* copy: */snd_rme96_playback_copy,1617 /* silence: */snd_rme96_playback_silence,1497 .open = snd_rme96_playback_spdif_open, 1498 .close = snd_rme96_playback_close, 1499 .ioctl = snd_pcm_lib_ioctl, 1500 .hw_params = snd_rme96_playback_hw_params, 1501 .hw_free = snd_rme96_playback_hw_free, 1502 .prepare = snd_rme96_playback_prepare, 1503 .trigger = snd_rme96_playback_trigger, 1504 .pointer = snd_rme96_playback_pointer, 1505 .copy = snd_rme96_playback_copy, 1506 .silence = snd_rme96_playback_silence, 1618 1507 }; 1619 1508 1620 1509 static snd_pcm_ops_t snd_rme96_capture_spdif_ops = { 1621 /* open: */ snd_rme96_capture_spdif_open, 1622 /* close: */ snd_rme96_capture_close, 1623 /* ioctl: */ snd_pcm_lib_ioctl, 1624 /* hw_params:*/ snd_rme96_capture_hw_params, 1625 /* hw_free: */ snd_rme96_capture_hw_free, 1626 /* prepare: */ snd_rme96_capture_prepare, 1627 /* trigger: */ snd_rme96_capture_trigger, 1628 /* pointer: */ snd_rme96_capture_pointer, 1629 /* copy: */ snd_rme96_capture_copy, 1630 0 1510 .open = snd_rme96_capture_spdif_open, 1511 .close = snd_rme96_capture_close, 1512 .ioctl = snd_pcm_lib_ioctl, 1513 .hw_params = snd_rme96_capture_hw_params, 1514 .hw_free = snd_rme96_capture_hw_free, 1515 .prepare = snd_rme96_capture_prepare, 1516 .trigger = snd_rme96_capture_trigger, 1517 .pointer = snd_rme96_capture_pointer, 1518 .copy = snd_rme96_capture_copy, 1631 1519 }; 1632 1520 1633 1521 static snd_pcm_ops_t snd_rme96_playback_adat_ops = { 1634 /* open: */snd_rme96_playback_adat_open,1635 /* close: */snd_rme96_playback_close,1636 /* ioctl: */snd_pcm_lib_ioctl,1637 /* hw_params:*/snd_rme96_playback_hw_params,1638 /* hw_free: */snd_rme96_playback_hw_free,1639 /* prepare: */snd_rme96_playback_prepare,1640 /* trigger: */snd_rme96_playback_trigger,1641 /* pointer: */snd_rme96_playback_pointer,1642 /* copy: */snd_rme96_playback_copy,1643 /* silence: */snd_rme96_playback_silence,1522 .open = snd_rme96_playback_adat_open, 1523 .close = snd_rme96_playback_close, 1524 .ioctl = snd_pcm_lib_ioctl, 1525 .hw_params = snd_rme96_playback_hw_params, 1526 .hw_free = snd_rme96_playback_hw_free, 1527 .prepare = snd_rme96_playback_prepare, 1528 .trigger = snd_rme96_playback_trigger, 1529 .pointer = snd_rme96_playback_pointer, 1530 .copy = snd_rme96_playback_copy, 1531 .silence = snd_rme96_playback_silence, 1644 1532 }; 1645 1533 1646 1534 static snd_pcm_ops_t snd_rme96_capture_adat_ops = { 1647 /* open: */snd_rme96_capture_adat_open,1648 /* close: */snd_rme96_capture_close,1649 /* ioctl: */snd_pcm_lib_ioctl,1650 /* hw_params:*/snd_rme96_capture_hw_params,1651 /* hw_free: */snd_rme96_capture_hw_free,1652 /* prepare: */snd_rme96_capture_prepare,1653 /* trigger: */snd_rme96_capture_trigger,1654 /* pointer: */snd_rme96_capture_pointer,1655 /* copy: */snd_rme96_capture_copy,1535 .open = snd_rme96_capture_adat_open, 1536 .close = snd_rme96_capture_close, 1537 .ioctl = snd_pcm_lib_ioctl, 1538 .hw_params = snd_rme96_capture_hw_params, 1539 .hw_free = snd_rme96_capture_hw_free, 1540 .prepare = snd_rme96_capture_prepare, 1541 .trigger = snd_rme96_capture_trigger, 1542 .pointer = snd_rme96_capture_pointer, 1543 .copy = snd_rme96_capture_copy, 1656 1544 }; 1657 #else1658 static snd_pcm_ops_t snd_rme96_playback_spdif_ops = {1659 open: snd_rme96_playback_spdif_open,1660 close: snd_rme96_playback_close,1661 ioctl: snd_pcm_lib_ioctl,1662 hw_params: snd_rme96_playback_hw_params,1663 hw_free: snd_rme96_playback_hw_free,1664 prepare: snd_rme96_playback_prepare,1665 trigger: snd_rme96_playback_trigger,1666 pointer: snd_rme96_playback_pointer,1667 copy: snd_rme96_playback_copy,1668 silence: snd_rme96_playback_silence,1669 };1670 1671 static snd_pcm_ops_t snd_rme96_capture_spdif_ops = {1672 open: snd_rme96_capture_spdif_open,1673 close: snd_rme96_capture_close,1674 ioctl: snd_pcm_lib_ioctl,1675 hw_params: snd_rme96_capture_hw_params,1676 hw_free: snd_rme96_capture_hw_free,1677 prepare: snd_rme96_capture_prepare,1678 trigger: snd_rme96_capture_trigger,1679 pointer: snd_rme96_capture_pointer,1680 copy: snd_rme96_capture_copy,1681 };1682 1683 static snd_pcm_ops_t snd_rme96_playback_adat_ops = {1684 open: snd_rme96_playback_adat_open,1685 close: snd_rme96_playback_close,1686 ioctl: snd_pcm_lib_ioctl,1687 hw_params: snd_rme96_playback_hw_params,1688 hw_free: snd_rme96_playback_hw_free,1689 prepare: snd_rme96_playback_prepare,1690 trigger: snd_rme96_playback_trigger,1691 pointer: snd_rme96_playback_pointer,1692 copy: snd_rme96_playback_copy,1693 silence: snd_rme96_playback_silence,1694 };1695 1696 static snd_pcm_ops_t snd_rme96_capture_adat_ops = {1697 open: snd_rme96_capture_adat_open,1698 close: snd_rme96_capture_close,1699 ioctl: snd_pcm_lib_ioctl,1700 hw_params: snd_rme96_capture_hw_params,1701 hw_free: snd_rme96_capture_hw_free,1702 prepare: snd_rme96_capture_prepare,1703 trigger: snd_rme96_capture_trigger,1704 pointer: snd_rme96_capture_pointer,1705 copy: snd_rme96_capture_copy,1706 };1707 #endif1708 1545 1709 1546 static void … … 2468 2305 } 2469 2306 2470 #ifdef TARGET_OS22471 2307 static snd_kcontrol_new_t snd_rme96_controls[] = { 2472 2308 { 2473 SNDRV_CTL_ELEM_IFACE_PCM,0,0,2474 SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),0,0,0,2475 snd_rme96_control_spdif_info,2476 snd_rme96_control_spdif_get,2477 snd_rme96_control_spdif_put,02309 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2310 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 2311 .info = snd_rme96_control_spdif_info, 2312 .get = snd_rme96_control_spdif_get, 2313 .put = snd_rme96_control_spdif_put 2478 2314 }, 2479 2315 { 2480 SNDRV_CTL_ELEM_IFACE_PCM,0,0,2481 SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),0,2482 SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,0,2483 snd_rme96_control_spdif_stream_info,2484 snd_rme96_control_spdif_stream_get,2485 snd_rme96_control_spdif_stream_put,02316 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 2317 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2318 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), 2319 .info = snd_rme96_control_spdif_stream_info, 2320 .get = snd_rme96_control_spdif_stream_get, 2321 .put = snd_rme96_control_spdif_stream_put 2486 2322 }, 2487 2323 { 2488 SNDRV_CTL_ELEM_IFACE_MIXER,0,0,2489 SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),0,2490 SNDRV_CTL_ELEM_ACCESS_READ,0,2491 snd_rme96_control_spdif_mask_info,2492 snd_rme96_control_spdif_mask_get,0,2493 IEC958_AES0_NONAUDIO |2324 .access = SNDRV_CTL_ELEM_ACCESS_READ, 2325 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2326 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK), 2327 .info = snd_rme96_control_spdif_mask_info, 2328 .get = snd_rme96_control_spdif_mask_get, 2329 .private_value = IEC958_AES0_NONAUDIO | 2494 2330 IEC958_AES0_PROFESSIONAL | 2495 2331 IEC958_AES0_CON_EMPHASIS 2496 2332 }, 2497 2333 { 2498 SNDRV_CTL_ELEM_IFACE_MIXER,0,0,2499 SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK),0,2500 SNDRV_CTL_ELEM_ACCESS_READ,0,2501 snd_rme96_control_spdif_mask_info,2502 snd_rme96_control_spdif_mask_get,0,2503 IEC958_AES0_NONAUDIO |2334 .access = SNDRV_CTL_ELEM_ACCESS_READ, 2335 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2336 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK), 2337 .info = snd_rme96_control_spdif_mask_info, 2338 .get = snd_rme96_control_spdif_mask_get, 2339 .private_value = IEC958_AES0_NONAUDIO | 2504 2340 IEC958_AES0_PROFESSIONAL | 2505 2341 IEC958_AES0_PRO_EMPHASIS 2506 2342 }, 2507 2343 { 2508 SNDRV_CTL_ELEM_IFACE_PCM,0,0,2509 "Input Connector",0,0,0,2510 snd_rme96_info_inputtype_control,2511 snd_rme96_get_inputtype_control,2512 snd_rme96_put_inputtype_control, 02344 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2345 .name = "Input Connector", 2346 .info = snd_rme96_info_inputtype_control, 2347 .get = snd_rme96_get_inputtype_control, 2348 .put = snd_rme96_put_inputtype_control 2513 2349 }, 2514 2350 { 2515 SNDRV_CTL_ELEM_IFACE_PCM,0,0,2516 "Loopback Input",0,0,0,2517 snd_rme96_info_loopback_control,2518 snd_rme96_get_loopback_control,2519 snd_rme96_put_loopback_control,02351 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2352 .name = "Loopback Input", 2353 .info = snd_rme96_info_loopback_control, 2354 .get = snd_rme96_get_loopback_control, 2355 .put = snd_rme96_put_loopback_control 2520 2356 }, 2521 2357 { 2522 SNDRV_CTL_ELEM_IFACE_PCM,0,0, 2523 "Clock Mode",0,0,0, 2524 snd_rme96_info_clockmode_control, 2525 snd_rme96_get_clockmode_control, 2526 snd_rme96_put_clockmode_control,0 2527 }, 2528 { 2529 SNDRV_CTL_ELEM_IFACE_PCM,0,0, 2530 "Monitor Tracks",0,0,0, 2531 snd_rme96_info_montracks_control, 2532 snd_rme96_get_montracks_control, 2533 snd_rme96_put_montracks_control,0 2358 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2359 .name = "Clock Mode", 2360 .info = snd_rme96_info_clockmode_control, 2361 .get = snd_rme96_get_clockmode_control, 2362 .put = snd_rme96_put_clockmode_control 2534 2363 }, 2535 2364 { 2536 SNDRV_CTL_ELEM_IFACE_PCM,0,0,2537 "Attenuation",0,0,0,2538 snd_rme96_info_attenuation_control,2539 snd_rme96_get_attenuation_control,2540 snd_rme96_put_attenuation_control,02365 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2366 .name = "Monitor Tracks", 2367 .info = snd_rme96_info_montracks_control, 2368 .get = snd_rme96_get_montracks_control, 2369 .put = snd_rme96_put_montracks_control 2541 2370 }, 2542 2371 { 2543 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 2544 "DAC Playback Volume",0,0,0, 2545 snd_rme96_dac_volume_info, 2546 snd_rme96_dac_volume_get, 2547 snd_rme96_dac_volume_put,0 2372 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2373 .name = "Attenuation", 2374 .info = snd_rme96_info_attenuation_control, 2375 .get = snd_rme96_get_attenuation_control, 2376 .put = snd_rme96_put_attenuation_control 2377 }, 2378 { 2379 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2380 .name = "DAC Playback Volume", 2381 .info = snd_rme96_dac_volume_info, 2382 .get = snd_rme96_dac_volume_get, 2383 .put = snd_rme96_dac_volume_put 2548 2384 } 2549 2385 }; 2550 #else2551 static snd_kcontrol_new_t snd_rme96_controls[] = {2552 {2553 iface: SNDRV_CTL_ELEM_IFACE_PCM,2554 name: SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),2555 info: snd_rme96_control_spdif_info,2556 get: snd_rme96_control_spdif_get,2557 put: snd_rme96_control_spdif_put2558 },2559 {2560 access: SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,2561 iface: SNDRV_CTL_ELEM_IFACE_PCM,2562 name: SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),2563 info: snd_rme96_control_spdif_stream_info,2564 get: snd_rme96_control_spdif_stream_get,2565 put: snd_rme96_control_spdif_stream_put2566 },2567 {2568 access: SNDRV_CTL_ELEM_ACCESS_READ,2569 iface: SNDRV_CTL_ELEM_IFACE_MIXER,2570 name: SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),2571 info: snd_rme96_control_spdif_mask_info,2572 get: snd_rme96_control_spdif_mask_get,2573 private_value: IEC958_AES0_NONAUDIO |2574 IEC958_AES0_PROFESSIONAL |2575 IEC958_AES0_CON_EMPHASIS2576 },2577 {2578 access: SNDRV_CTL_ELEM_ACCESS_READ,2579 iface: SNDRV_CTL_ELEM_IFACE_MIXER,2580 name: SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK),2581 info: snd_rme96_control_spdif_mask_info,2582 get: snd_rme96_control_spdif_mask_get,2583 private_value: IEC958_AES0_NONAUDIO |2584 IEC958_AES0_PROFESSIONAL |2585 IEC958_AES0_PRO_EMPHASIS2586 },2587 {2588 iface: SNDRV_CTL_ELEM_IFACE_PCM,2589 name: "Input Connector",2590 info: snd_rme96_info_inputtype_control,2591 get: snd_rme96_get_inputtype_control,2592 put: snd_rme96_put_inputtype_control2593 },2594 {2595 iface: SNDRV_CTL_ELEM_IFACE_PCM,2596 name: "Loopback Input",2597 info: snd_rme96_info_loopback_control,2598 get: snd_rme96_get_loopback_control,2599 put: snd_rme96_put_loopback_control2600 },2601 {2602 iface: SNDRV_CTL_ELEM_IFACE_PCM,2603 name: "Clock Mode",2604 info: snd_rme96_info_clockmode_control,2605 get: snd_rme96_get_clockmode_control,2606 put: snd_rme96_put_clockmode_control2607 },2608 {2609 iface: SNDRV_CTL_ELEM_IFACE_PCM,2610 name: "Monitor Tracks",2611 info: snd_rme96_info_montracks_control,2612 get: snd_rme96_get_montracks_control,2613 put: snd_rme96_put_montracks_control2614 },2615 {2616 iface: SNDRV_CTL_ELEM_IFACE_PCM,2617 name: "Attenuation",2618 info: snd_rme96_info_attenuation_control,2619 get: snd_rme96_get_attenuation_control,2620 put: snd_rme96_put_attenuation_control2621 },2622 {2623 iface: SNDRV_CTL_ELEM_IFACE_MIXER,2624 name: "DAC Playback Volume",2625 info: snd_rme96_dac_volume_info,2626 get: snd_rme96_dac_volume_get,2627 put: snd_rme96_dac_volume_put2628 }2629 };2630 #endif2631 2386 2632 2387 static int … … 2729 2484 } 2730 2485 2731 #ifdef TARGET_OS22732 2486 static struct pci_driver driver = { 2733 0,0,0,"RME Digi96",2734 snd_rme96_ids,2735 snd_rme96_probe,2736 snd_rme96_remove,0,02487 .name = "RME Digi96", 2488 .id_table = snd_rme96_ids, 2489 .probe = snd_rme96_probe, 2490 .remove = __devexit_p(snd_rme96_remove), 2737 2491 }; 2738 #else2739 static struct pci_driver driver = {2740 name: "RME Digi96",2741 id_table: snd_rme96_ids,2742 probe: snd_rme96_probe,2743 remove: __devexit_p(snd_rme96_remove),2744 };2745 #endif2746 2492 2747 2493 static int __init alsa_card_rme96_init(void)  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/hdsp.c
r207 r210 26 26 #include <linux/init.h> 27 27 #include <linux/slab.h> 28 #include <linux/pci.h> 28 29 #include <sound/core.h> 29 30 #include <sound/control.h> … … 42 43 static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ 43 44 static int snd_precise_ptr[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* Enable precise pointer */ 45 static int snd_line_outs_monitor[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0}; /* Send all inputs/playback to line outs */ 46 static int snd_force_firmware[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0}; /* Force firmware reload */ 44 47 45 48 MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); … … 55 58 MODULE_PARM_DESC(snd_precise_ptr, "Enable precise pointer (doesn't work reliably)."); 56 59 MODULE_PARM_SYNTAX(snd_precise_ptr, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); 60 MODULE_PARM(snd_line_outs_monitor,"1-" __MODULE_STRING(SNDRV_CARDS) "i"); 61 MODULE_PARM_DESC(snd_line_outs_monitor, "Send all input and playback streams to line outs by default."); 62 MODULE_PARM_SYNTAX(snd_line_outs_monitor, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); 63 MODULE_PARM(snd_force_firmware,"1-" __MODULE_STRING(SNDRV_CARDS) "i"); 64 MODULE_PARM_DESC(snd_force_firmware, "Force a reload of the I/O box firmware"); 65 MODULE_PARM_SYNTAX(snd_force_firmware, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); 57 66 MODULE_AUTHOR("Paul Davis <pbd@op.net>"); 58 MODULE_DESCRIPTION("RME Hammerfall D DSP");67 MODULE_DESCRIPTION("RME Hammerfall DSP"); 59 68 MODULE_LICENSE("GPL"); 60 69 MODULE_CLASSES("{sound}"); … … 474 483 return -1; 475 484 } 476 477 485 hdsp_write (hdsp, HDSP_fifoData, ad); 478 486 hdsp->mixer_matrix[addr] = data; … … 846 854 847 855 if (clear_timer && hmidi->istimer && --hmidi->istimer <= 0) { 848 printk ("removing timer because there is nothing to do\n"); 849 if (del_timer(&hmidi->timer)) { 850 printk ("not removed\n"); 851 } 856 del_timer(&hmidi->timer); 852 857 } 853 858 } … … 948 953 hmidi->timer.data = (unsigned long) hmidi; 949 954 hmidi->timer.expires = 1 + jiffies; 950 printk ("add timer from output trigger\n");951 955 add_timer(&hmidi->timer); 952 956 hmidi->istimer++; … … 954 958 } else { 955 959 if (hmidi->istimer && --hmidi->istimer <= 0) { 956 printk ("remove timer in trigger off\n"); 957 if (del_timer (&hmidi->timer)) { 958 printk ("not removed\n"); 959 } 960 del_timer (&hmidi->timer); 960 961 } 961 962 } … … 1022 1023 snd_rawmidi_ops_t snd_hdsp_midi_output = 1023 1024 { 1024 open:snd_hdsp_midi_output_open,1025 close:snd_hdsp_midi_output_close,1026 trigger:snd_hdsp_midi_output_trigger,1025 .open = snd_hdsp_midi_output_open, 1026 .close = snd_hdsp_midi_output_close, 1027 .trigger = snd_hdsp_midi_output_trigger, 1027 1028 }; 1028 1029 1029 1030 snd_rawmidi_ops_t snd_hdsp_midi_input = 1030 1031 { 1031 open:snd_hdsp_midi_input_open,1032 close:snd_hdsp_midi_input_close,1033 trigger:snd_hdsp_midi_input_trigger,1032 .open = snd_hdsp_midi_input_open, 1033 .close = snd_hdsp_midi_input_close, 1034 .trigger = snd_hdsp_midi_input_trigger, 1034 1035 }; 1035 1036 … … 1166 1167 1167 1168 #define HDSP_SPDIF_IN(xname, xindex) \ 1168 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index:xindex, \1169 info:snd_hdsp_info_spdif_in, \1170 get: snd_hdsp_get_spdif_in, put:snd_hdsp_put_spdif_in }1169 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1170 .info = snd_hdsp_info_spdif_in, \ 1171 .get = snd_hdsp_get_spdif_in, .put = snd_hdsp_put_spdif_in } 1171 1172 1172 1173 static unsigned int hdsp_spdif_in(hdsp_t *hdsp) … … 1226 1227 1227 1228 #define HDSP_SPDIF_OUT(xname, xindex) \ 1228 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index:xindex, \1229 info:snd_hdsp_info_spdif_out, \1230 get: snd_hdsp_get_spdif_out, put:snd_hdsp_put_spdif_out }1229 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1230 .info = snd_hdsp_info_spdif_out, \ 1231 .get = snd_hdsp_get_spdif_out, .put = snd_hdsp_put_spdif_out } 1231 1232 1232 1233 static int hdsp_spdif_out(hdsp_t *hdsp) … … 1284 1285 1285 1286 #define HDSP_SYNC_PREF(xname, xindex) \ 1286 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index:xindex, \1287 info:snd_hdsp_info_sync_pref, \1288 get: snd_hdsp_get_sync_pref, put:snd_hdsp_put_sync_pref }1287 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1288 .info = snd_hdsp_info_sync_pref, \ 1289 .get = snd_hdsp_get_sync_pref, .put = snd_hdsp_put_sync_pref } 1289 1290 1290 1291 static int hdsp_sync_pref(hdsp_t *hdsp) … … 1399 1400 1400 1401 #define HDSP_PASSTHRU(xname, xindex) \ 1401 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index:xindex, \1402 info:snd_hdsp_info_passthru, \1403 put:snd_hdsp_put_passthru, \1404 get:snd_hdsp_get_passthru }1402 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1403 .info = snd_hdsp_info_passthru, \ 1404 .put = snd_hdsp_put_passthru, \ 1405 .get = snd_hdsp_get_passthru } 1405 1406 1406 1407 static int snd_hdsp_info_passthru(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) … … 1445 1446 1446 1447 #define HDSP_LINE_OUT(xname, xindex) \ 1447 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index:xindex, \1448 info:snd_hdsp_info_line_out, \1449 get: snd_hdsp_get_line_out, put:snd_hdsp_put_line_out }1448 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1449 .info = snd_hdsp_info_line_out, \ 1450 .get = snd_hdsp_get_line_out, .put = snd_hdsp_put_line_out } 1450 1451 1451 1452 static int hdsp_line_out(hdsp_t *hdsp) … … 1503 1504 1504 1505 #define HDSP_MIXER(xname, xindex) \ 1505 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index:xindex, \1506 info:snd_hdsp_info_mixer, \1507 get: snd_hdsp_get_mixer, put:snd_hdsp_put_mixer }1506 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1507 .info = snd_hdsp_info_mixer, \ 1508 .get = snd_hdsp_get_mixer, .put = snd_hdsp_put_mixer } 1508 1509 1509 1510 static int snd_hdsp_info_mixer(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1577 1578 1578 1579 #define HDSP_PLAYBACK_MIXER \ 1579 { iface:SNDRV_CTL_ELEM_IFACE_MIXER, \1580 access:SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE | \1580 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ 1581 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE | \ 1581 1582 SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1582 info:snd_hdsp_info_playback_mixer, \1583 get: snd_hdsp_get_playback_mixer, put:snd_hdsp_put_playback_mixer }1583 .info = snd_hdsp_info_playback_mixer, \ 1584 .get = snd_hdsp_get_playback_mixer, .put = snd_hdsp_put_playback_mixer } 1584 1585 1585 1586 static int snd_hdsp_info_playback_mixer(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1634 1635 1635 1636 #define HDSP_PEAK_PLAYBACK \ 1636 { iface:SNDRV_CTL_ELEM_IFACE_PCM, \1637 access:SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \1638 info:snd_hdsp_info_peak_playback, \1639 get:snd_hdsp_get_peak_playback \1637 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, \ 1638 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1639 .info = snd_hdsp_info_peak_playback, \ 1640 .get = snd_hdsp_get_peak_playback \ 1640 1641 } 1641 1642 … … 1657 1658 1658 1659 #define HDSP_PEAK_INPUT \ 1659 { iface:SNDRV_CTL_ELEM_IFACE_PCM, \1660 access:SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \1661 info:snd_hdsp_info_peak_input, \1662 get:snd_hdsp_get_peak_input \1660 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, \ 1661 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1662 .info = snd_hdsp_info_peak_input, \ 1663 .get = snd_hdsp_get_peak_input \ 1663 1664 } 1664 1665 … … 1680 1681 1681 1682 #define HDSP_PEAK_OUTPUT \ 1682 { iface:SNDRV_CTL_ELEM_IFACE_PCM, \1683 access:SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \1684 info:snd_hdsp_info_peak_output, \1685 get:snd_hdsp_get_peak_output \1683 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, \ 1684 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1685 .info = snd_hdsp_info_peak_output, \ 1686 .get = snd_hdsp_get_peak_output \ 1686 1687 } 1687 1688 … … 1703 1704 1704 1705 #define HDSP_RMS_INPUT \ 1705 { iface:SNDRV_CTL_ELEM_IFACE_PCM, \1706 access:SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \1707 info:snd_hdsp_info_rms_input, \1708 get:snd_hdsp_get_rms_input \1706 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, \ 1707 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1708 .info = snd_hdsp_info_rms_input, \ 1709 .get = snd_hdsp_get_rms_input \ 1709 1710 } 1710 1711 … … 1724 1725 1725 1726 #define HDSP_RMS_PLAYBACK \ 1726 { iface:SNDRV_CTL_ELEM_IFACE_PCM, \1727 access:SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \1728 info:snd_hdsp_info_rms_playback, \1729 get:snd_hdsp_get_rms_playback \1727 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, \ 1728 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1729 .info = snd_hdsp_info_rms_playback, \ 1730 .get = snd_hdsp_get_rms_playback \ 1730 1731 } 1731 1732 … … 1746 1747 static snd_kcontrol_new_t snd_hdsp_controls[] = { 1747 1748 { 1748 iface:SNDRV_CTL_ELEM_IFACE_PCM,1749 name:SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),1750 info:snd_hdsp_control_spdif_info,1751 get:snd_hdsp_control_spdif_get,1752 put:snd_hdsp_control_spdif_put,1749 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1750 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 1751 .info = snd_hdsp_control_spdif_info, 1752 .get = snd_hdsp_control_spdif_get, 1753 .put = snd_hdsp_control_spdif_put, 1753 1754 }, 1754 1755 { 1755 access:SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,1756 iface:SNDRV_CTL_ELEM_IFACE_PCM,1757 name:SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),1758 info:snd_hdsp_control_spdif_stream_info,1759 get:snd_hdsp_control_spdif_stream_get,1760 put:snd_hdsp_control_spdif_stream_put,1756 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 1757 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1758 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), 1759 .info = snd_hdsp_control_spdif_stream_info, 1760 .get = snd_hdsp_control_spdif_stream_get, 1761 .put = snd_hdsp_control_spdif_stream_put, 1761 1762 }, 1762 1763 { 1763 access:SNDRV_CTL_ELEM_ACCESS_READ,1764 iface:SNDRV_CTL_ELEM_IFACE_MIXER,1765 name:SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),1766 info:snd_hdsp_control_spdif_mask_info,1767 get:snd_hdsp_control_spdif_mask_get,1768 private_value:IEC958_AES0_NONAUDIO |1764 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1765 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1766 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK), 1767 .info = snd_hdsp_control_spdif_mask_info, 1768 .get = snd_hdsp_control_spdif_mask_get, 1769 .private_value = IEC958_AES0_NONAUDIO | 1769 1770 IEC958_AES0_PROFESSIONAL | 1770 1771 IEC958_AES0_CON_EMPHASIS, 1771 1772 }, 1772 1773 { 1773 access:SNDRV_CTL_ELEM_ACCESS_READ,1774 iface:SNDRV_CTL_ELEM_IFACE_MIXER,1775 name:SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK),1776 info:snd_hdsp_control_spdif_mask_info,1777 get:snd_hdsp_control_spdif_mask_get,1778 private_value:IEC958_AES0_NONAUDIO |1774 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1775 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1776 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK), 1777 .info = snd_hdsp_control_spdif_mask_info, 1778 .get = snd_hdsp_control_spdif_mask_get, 1779 .private_value = IEC958_AES0_NONAUDIO | 1779 1780 IEC958_AES0_PROFESSIONAL | 1780 1781 IEC958_AES0_PRO_EMPHASIS, … … 2190 2191 hdsp_write_gain (hdsp, i, MINUS_INFINITY_GAIN); 2191 2192 2193 if (snd_line_outs_monitor[hdsp->dev]) { 2194 2195 snd_printk ("sending all inputs and playback streams to line outs.\n"); 2196 2197 /* route all inputs to the line outs for easy monitoring. send 2198 odd numbered channels to right, even to left. 2199 */ 2200 2201 for (i = 0; i < HDSP_MAX_CHANNELS; i++) { 2202 if (i & 1) { 2203 hdsp_write_gain (hdsp, INPUT_TO_OUTPUT_KEY (i, 26), UNITY_GAIN); 2204 hdsp_write_gain (hdsp, PLAYBACK_TO_OUTPUT_KEY (i, 26), UNITY_GAIN); 2205 } else { 2206 hdsp_write_gain (hdsp, INPUT_TO_OUTPUT_KEY (i, 27), UNITY_GAIN); 2207 hdsp_write_gain (hdsp, PLAYBACK_TO_OUTPUT_KEY (i, 27), UNITY_GAIN); 2208 } 2209 } 2210 } 2211 2192 2212 hdsp->passthru = 0; 2193 2213 … … 2527 2547 static snd_pcm_hardware_t snd_hdsp_playback_subinfo = 2528 2548 { 2529 info:(SNDRV_PCM_INFO_MMAP |2549 .info = (SNDRV_PCM_INFO_MMAP | 2530 2550 SNDRV_PCM_INFO_MMAP_VALID | 2531 2551 SNDRV_PCM_INFO_NONINTERLEAVED | 2532 2552 SNDRV_PCM_INFO_SYNC_START | 2533 2553 SNDRV_PCM_INFO_DOUBLE), 2534 formats:SNDRV_PCM_FMTBIT_S32_LE,2535 rates: (SNDRV_PCM_RATE_32000 |2554 .formats = SNDRV_PCM_FMTBIT_S32_LE, 2555 .rates = (SNDRV_PCM_RATE_32000 | 2536 2556 SNDRV_PCM_RATE_44100 | 2537 2557 SNDRV_PCM_RATE_48000 | … … 2539 2559 SNDRV_PCM_RATE_88200 | 2540 2560 SNDRV_PCM_RATE_96000), 2541 rate_min:32000,2542 rate_max:96000,2543 channels_min:10,2544 channels_max:HDSP_MAX_CHANNELS,2545 buffer_bytes_max:1024*1024,2546 period_bytes_min:1,2547 period_bytes_max:1024*1024,2548 periods_min:2,2549 periods_max:2,2550 fifo_size:0,2561 .rate_min = 32000, 2562 .rate_max = 96000, 2563 .channels_min = 10, 2564 .channels_max = HDSP_MAX_CHANNELS, 2565 .buffer_bytes_max = 1024*1024, 2566 .period_bytes_min = 1, 2567 .period_bytes_max = 1024*1024, 2568 .periods_min = 2, 2569 .periods_max = 2, 2570 .fifo_size = 0, 2551 2571 }; 2552 2572 2553 2573 static snd_pcm_hardware_t snd_hdsp_capture_subinfo = 2554 2574 { 2555 info:(SNDRV_PCM_INFO_MMAP |2575 .info = (SNDRV_PCM_INFO_MMAP | 2556 2576 SNDRV_PCM_INFO_MMAP_VALID | 2557 2577 SNDRV_PCM_INFO_NONINTERLEAVED | 2558 2578 SNDRV_PCM_INFO_SYNC_START), 2559 formats:SNDRV_PCM_FMTBIT_S32_LE,2560 rates:(SNDRV_PCM_RATE_32000 |2579 .formats = SNDRV_PCM_FMTBIT_S32_LE, 2580 .rates = (SNDRV_PCM_RATE_32000 | 2561 2581 SNDRV_PCM_RATE_44100 | 2562 2582 SNDRV_PCM_RATE_48000 | … … 2564 2584 SNDRV_PCM_RATE_88200 | 2565 2585 SNDRV_PCM_RATE_96000), 2566 rate_min:32000,2567 rate_max:96000,2568 channels_min:10,2569 channels_max:HDSP_MAX_CHANNELS,2570 buffer_bytes_max:1024*1024,2571 period_bytes_min:1,2572 period_bytes_max:1024*1024,2573 periods_min:2,2574 periods_max:2,2575 fifo_size:0,2586 .rate_min = 32000, 2587 .rate_max = 96000, 2588 .channels_min = 10, 2589 .channels_max = HDSP_MAX_CHANNELS, 2590 .buffer_bytes_max = 1024*1024, 2591 .period_bytes_min = 1, 2592 .period_bytes_max = 1024*1024, 2593 .periods_min = 2, 2594 .periods_max = 2, 2595 .fifo_size = 0, 2576 2596 }; 2577 2597 … … 2581 2601 2582 2602 static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = { 2583 count:PERIOD_SIZES,2584 list:period_sizes,2585 mask:02603 .count = PERIOD_SIZES, 2604 .list = period_sizes, 2605 .mask = 0 2586 2606 }; 2587 2607 … … 2608 2628 }; 2609 2629 return snd_interval_refine(c, &t); 2610 } else if (r->max < 88200) {2630 } else if (r->max < 64000) { 2611 2631 snd_interval_t t = { 2612 2632 min: hdsp->ss_channels, … … 2627 2647 if (c->min >= hdsp->ss_channels) { 2628 2648 snd_interval_t t = { 2629 min: 44100,2649 min: 32000, 2630 2650 max: 48000, 2631 2651 integer: 1, … … 2634 2654 } else if (c->max <= hdsp->ds_channels) { 2635 2655 snd_interval_t t = { 2636 min: 88200,2656 min: 64000, 2637 2657 max: 96000, 2638 2658 integer: 1, … … 2766 2786 2767 2787 static snd_pcm_ops_t snd_hdsp_playback_ops = { 2768 open:snd_hdsp_playback_open,2769 close:snd_hdsp_playback_release,2770 ioctl:snd_hdsp_ioctl,2771 hw_params:snd_hdsp_hw_params,2772 prepare:snd_hdsp_prepare,2773 trigger:snd_hdsp_trigger,2774 pointer:snd_hdsp_hw_pointer,2775 copy:snd_hdsp_playback_copy,2776 silence:snd_hdsp_hw_silence,2788 .open = snd_hdsp_playback_open, 2789 .close = snd_hdsp_playback_release, 2790 .ioctl = snd_hdsp_ioctl, 2791 .hw_params = snd_hdsp_hw_params, 2792 .prepare = snd_hdsp_prepare, 2793 .trigger = snd_hdsp_trigger, 2794 .pointer = snd_hdsp_hw_pointer, 2795 .copy = snd_hdsp_playback_copy, 2796 .silence = snd_hdsp_hw_silence, 2777 2797 }; 2778 2798 2779 2799 static snd_pcm_ops_t snd_hdsp_capture_ops = { 2780 open:snd_hdsp_capture_open,2781 close:snd_hdsp_capture_release,2782 ioctl:snd_hdsp_ioctl,2783 hw_params:snd_hdsp_hw_params,2784 prepare:snd_hdsp_prepare,2785 trigger:snd_hdsp_trigger,2786 pointer:snd_hdsp_hw_pointer,2787 copy:snd_hdsp_capture_copy,2800 .open = snd_hdsp_capture_open, 2801 .close = snd_hdsp_capture_release, 2802 .ioctl = snd_hdsp_ioctl, 2803 .hw_params = snd_hdsp_hw_params, 2804 .prepare = snd_hdsp_prepare, 2805 .trigger = snd_hdsp_trigger, 2806 .pointer = snd_hdsp_hw_pointer, 2807 .copy = snd_hdsp_capture_copy, 2788 2808 }; 2789 2809 … … 2812 2832 { 2813 2833 int i; 2814 int status_reg;2815 2834 u32 *firmware_ptr; 2816 2835 … … 2830 2849 } 2831 2850 2832 status_reg = hdsp_read (hdsp, HDSP_statusRegister); 2833 2834 if ((status_reg & HDSP_DllError) == 0) { 2835 2836 /* i/o box is connected, firmware already loaded */ 2837 2838 if (hdsp_read (hdsp, HDSP_status2Register) & HDSP_version1) { 2839 hdsp->type = Multiface; 2840 hdsp->card_name = "RME Hammerfall DSP (Multiface)"; 2841 hdsp->ss_channels = MULTIFACE_SS_CHANNELS; 2842 hdsp->ds_channels = MULTIFACE_DS_CHANNELS; 2843 } else { 2844 hdsp->type = Digiface; 2845 hdsp->card_name = "RME Hammerfall DSP (Digiface)"; 2846 hdsp->ss_channels = DIGIFACE_SS_CHANNELS; 2847 hdsp->ds_channels = DIGIFACE_DS_CHANNELS; 2848 } 2849 2850 } else { 2851 2852 /* firmware not loaded, but i/o box is connected */ 2853 2851 if (snd_force_firmware[hdsp->dev] || (hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) { 2852 2853 snd_printk ("loading firmware\n"); 2854 2854 2855 hdsp_write (hdsp, HDSP_jtagReg, HDSP_PROGRAM); 2855 2856 hdsp_write (hdsp, HDSP_fifoData, 0); 2856 hdsp_fifo_wait (hdsp, 0, HDSP_SHORT_WAIT); 2857 if (hdsp_fifo_wait (hdsp, 0, HDSP_SHORT_WAIT) < 0) { 2858 snd_printk ("timeout waiting for firmware setup\n"); 2859 return -EIO; 2860 } 2857 2861 2858 2862 hdsp_write (hdsp, HDSP_jtagReg, HDSP_S_LOAD); 2859 2863 hdsp_write (hdsp, HDSP_fifoData, 0); 2860 2864 2861 if (hdsp_fifo_wait (hdsp, 0, HDSP_SHORT_WAIT) < 0) { 2862 printk ("looks like a multiface\n"); 2865 if (hdsp_fifo_wait (hdsp, 0, HDSP_SHORT_WAIT)) { 2863 2866 hdsp->type = Multiface; 2864 hdsp->card_name = "RME Hammerfall DSP (Multiface)";2865 2867 hdsp_write (hdsp, HDSP_jtagReg, HDSP_VERSION_BIT); 2866 2868 hdsp_write (hdsp, HDSP_jtagReg, HDSP_S_LOAD); 2867 2869 hdsp_fifo_wait (hdsp, 0, HDSP_SHORT_WAIT); 2868 2870 } else { 2869 printk ("looks like a digiface\n");2870 2871 hdsp->type = Digiface; 2871 hdsp->card_name = "RME Hammerfall DSP (Digiface)";2872 2872 } 2873 2873 … … 2875 2875 hdsp_write (hdsp, HDSP_fifoData, 0); 2876 2876 2877 if (hdsp_fifo_wait (hdsp, 0, HDSP_LONG_WAIT) < 0) {2877 if (hdsp_fifo_wait (hdsp, 0, HDSP_LONG_WAIT)) { 2878 2878 snd_printk ("timeout waiting for download preparation\n"); 2879 2879 return -EIO; … … 2883 2883 2884 2884 if (hdsp->type == Digiface) { 2885 firmware_ptr = digiface_firmware;2885 firmware_ptr = (u32 *) digiface_firmware; 2886 2886 } else { 2887 firmware_ptr = multiface_firmware;2887 firmware_ptr = (u32 *) multiface_firmware; 2888 2888 } 2889 2889 … … 2901 2901 } 2902 2902 2903 } 2904 2903 } else { 2904 2905 /* firmware already loaded, but we need to know what type 2906 of I/O box is connected. 2907 */ 2908 2909 if (hdsp_read(hdsp, HDSP_status2Register) & HDSP_version1) { 2910 hdsp->type = Multiface; 2911 } else { 2912 hdsp->type = Digiface; 2913 } 2914 } 2915 2916 if (hdsp->type == Digiface) { 2917 snd_printk ("I/O Box is a Digiface\n"); 2918 hdsp->card_name = "RME Hammerfall DSP (Digiface)"; 2919 hdsp->ss_channels = DIGIFACE_SS_CHANNELS; 2920 hdsp->ds_channels = DIGIFACE_DS_CHANNELS; 2921 } else { 2922 snd_printk ("I/O Box is a Multiface\n"); 2923 hdsp->card_name = "RME Hammerfall DSP (Multiface)"; 2924 hdsp->ss_channels = MULTIFACE_SS_CHANNELS; 2925 hdsp->ds_channels = MULTIFACE_DS_CHANNELS; 2926 } 2905 2927 2906 2928 snd_hdsp_flush_midi_input (hdsp, 0); … … 3094 3116 3095 3117 static struct pci_driver driver = { 3096 name:"RME Hammerfall DSP",3097 id_table:snd_hdsp_ids,3098 probe:snd_hdsp_probe,3099 remove:__devexit_p(snd_hdsp_remove),3118 .name = "RME Hammerfall DSP", 3119 .id_table = snd_hdsp_ids, 3120 .probe = snd_hdsp_probe, 3121 .remove = __devexit_p(snd_hdsp_remove), 3100 3122 }; 3101 3123  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/rme9652.c
r207 r210 524 524 break; 525 525 default: 526 spin_unlock_irq(&rme9652->lock); 526 527 return -EINVAL; 527 528 } … … 876 877 } 877 878 878 #ifdef TARGET_OS2879 879 #define RME9652_ADAT1_IN(xname, xindex) \ 880 { SNDRV_CTL_ELEM_IFACE_PCM, 0, 0, xname, xindex, \ 881 0, 0, snd_rme9652_info_adat1_in, \ 882 snd_rme9652_get_adat1_in, \ 883 snd_rme9652_put_adat1_in,0 } 884 #else 885 #define RME9652_ADAT1_IN(xname, xindex) \ 886 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index: xindex, \ 887 info: snd_rme9652_info_adat1_in, \ 888 get: snd_rme9652_get_adat1_in, \ 889 put: snd_rme9652_put_adat1_in } 890 #endif 880 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 881 .info = snd_rme9652_info_adat1_in, \ 882 .get = snd_rme9652_get_adat1_in, \ 883 .put = snd_rme9652_put_adat1_in } 891 884 892 885 static unsigned int rme9652_adat1_in(rme9652_t *rme9652) … … 964 957 } 965 958 966 #ifdef TARGET_OS2967 959 #define RME9652_SPDIF_IN(xname, xindex) \ 968 { SNDRV_CTL_ELEM_IFACE_PCM, 0, 0, xname, xindex, \ 969 0, 0, snd_rme9652_info_spdif_in, \ 970 snd_rme9652_get_spdif_in, snd_rme9652_put_spdif_in,0 } 971 #else 972 #define RME9652_SPDIF_IN(xname, xindex) \ 973 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index: xindex, \ 974 info: snd_rme9652_info_spdif_in, \ 975 get: snd_rme9652_get_spdif_in, put: snd_rme9652_put_spdif_in } 976 #endif 960 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 961 .info = snd_rme9652_info_spdif_in, \ 962 .get = snd_rme9652_get_spdif_in, .put = snd_rme9652_put_spdif_in } 977 963 978 964 static unsigned int rme9652_spdif_in(rme9652_t *rme9652) … … 1044 1030 } 1045 1031 1046 #ifdef TARGET_OS21047 1032 #define RME9652_SPDIF_OUT(xname, xindex) \ 1048 { SNDRV_CTL_ELEM_IFACE_PCM, 0, 0, xname, xindex, \ 1049 0, 0, snd_rme9652_info_spdif_out, \ 1050 snd_rme9652_get_spdif_out, snd_rme9652_put_spdif_out, 0 } 1051 #else 1052 #define RME9652_SPDIF_OUT(xname, xindex) \ 1053 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index: xindex, \ 1054 info: snd_rme9652_info_spdif_out, \ 1055 get: snd_rme9652_get_spdif_out, put: snd_rme9652_put_spdif_out } 1056 #endif 1033 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1034 .info = snd_rme9652_info_spdif_out, \ 1035 .get = snd_rme9652_get_spdif_out, .put = snd_rme9652_put_spdif_out } 1057 1036 1058 1037 static int rme9652_spdif_out(rme9652_t *rme9652) … … 1121 1100 } 1122 1101 1123 #ifdef TARGET_OS21124 1102 #define RME9652_SYNC_MODE(xname, xindex) \ 1125 { SNDRV_CTL_ELEM_IFACE_PCM, 0, 0, xname, xindex, \ 1126 0, 0, snd_rme9652_info_sync_mode, \ 1127 snd_rme9652_get_sync_mode, snd_rme9652_put_sync_mode,0 } 1128 #else 1129 #define RME9652_SYNC_MODE(xname, xindex) \ 1130 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index: xindex, \ 1131 info: snd_rme9652_info_sync_mode, \ 1132 get: snd_rme9652_get_sync_mode, put: snd_rme9652_put_sync_mode } 1133 #endif 1103 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1104 .info = snd_rme9652_info_sync_mode, \ 1105 .get = snd_rme9652_get_sync_mode, .put = snd_rme9652_put_sync_mode } 1134 1106 1135 1107 static int rme9652_sync_mode(rme9652_t *rme9652) … … 1215 1187 } 1216 1188 1217 #ifdef TARGET_OS21218 1189 #define RME9652_SYNC_PREF(xname, xindex) \ 1219 { SNDRV_CTL_ELEM_IFACE_PCM, 0, 0, xname, xindex, \ 1220 0, 0, snd_rme9652_info_sync_pref, \ 1221 snd_rme9652_get_sync_pref, snd_rme9652_put_sync_pref, 0 } 1222 #else 1223 #define RME9652_SYNC_PREF(xname, xindex) \ 1224 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index: xindex, \ 1225 info: snd_rme9652_info_sync_pref, \ 1226 get: snd_rme9652_get_sync_pref, put: snd_rme9652_put_sync_pref } 1227 #endif 1190 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1191 .info = snd_rme9652_info_sync_pref, \ 1192 .get = snd_rme9652_get_sync_pref, .put = snd_rme9652_put_sync_pref } 1228 1193 1229 1194 static int rme9652_sync_pref(rme9652_t *rme9652) … … 1370 1335 } 1371 1336 1372 #ifdef TARGET_OS21373 1337 #define RME9652_PASSTHRU(xname, xindex) \ 1374 { SNDRV_CTL_ELEM_IFACE_PCM, 0, 0, xname, xindex, \ 1375 0, 0, snd_rme9652_info_passthru, \ 1376 snd_rme9652_put_passthru, \ 1377 snd_rme9652_get_passthru,0 } 1378 #else 1379 #define RME9652_PASSTHRU(xname, xindex) \ 1380 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index: xindex, \ 1381 info: snd_rme9652_info_passthru, \ 1382 put: snd_rme9652_put_passthru, \ 1383 get: snd_rme9652_get_passthru } 1384 #endif 1338 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1339 .info = snd_rme9652_info_passthru, \ 1340 .put = snd_rme9652_put_passthru, \ 1341 .get = snd_rme9652_get_passthru } 1385 1342 1386 1343 static int snd_rme9652_info_passthru(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) … … 1426 1383 /* Read-only switches */ 1427 1384 1428 #ifdef TARGET_OS21429 1385 #define RME9652_SPDIF_RATE(xname, xindex) \ 1430 { SNDRV_CTL_ELEM_IFACE_PCM, 0,0, xname, xindex, \ 1431 SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1432 0, snd_rme9652_info_spdif_rate, \ 1433 snd_rme9652_get_spdif_rate, 0,0 } 1434 #else 1435 #define RME9652_SPDIF_RATE(xname, xindex) \ 1436 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index: xindex, \ 1437 access: SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1438 info: snd_rme9652_info_spdif_rate, \ 1439 get: snd_rme9652_get_spdif_rate } 1440 #endif 1386 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1387 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1388 .info = snd_rme9652_info_spdif_rate, \ 1389 .get = snd_rme9652_get_spdif_rate } 1441 1390 1442 1391 static int snd_rme9652_info_spdif_rate(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1460 1409 } 1461 1410 1462 #ifdef TARGET_OS21463 1411 #define RME9652_ADAT_SYNC(xname, xindex, xidx) \ 1464 { SNDRV_CTL_ELEM_IFACE_PCM, 0, 0, xname, xindex, \ 1465 SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1466 0, snd_rme9652_info_adat_sync, \ 1467 snd_rme9652_get_adat_sync, 0, xidx } 1468 #else 1469 #define RME9652_ADAT_SYNC(xname, xindex, xidx) \ 1470 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index: xindex, \ 1471 access: SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1472 info: snd_rme9652_info_adat_sync, \ 1473 get: snd_rme9652_get_adat_sync, private_value: xidx } 1474 #endif 1412 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1413 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1414 .info = snd_rme9652_info_adat_sync, \ 1415 .get = snd_rme9652_get_adat_sync, .private_value = xidx } 1475 1416 1476 1417 static int snd_rme9652_info_adat_sync(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1504 1445 } 1505 1446 1506 #ifdef TARGET_OS21507 1447 #define RME9652_TC_VALID(xname, xindex) \ 1508 { SNDRV_CTL_ELEM_IFACE_PCM, 0,0, xname, xindex, \ 1509 SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1510 0, snd_rme9652_info_tc_valid, \ 1511 snd_rme9652_get_tc_valid,0,0 } 1512 #else 1513 #define RME9652_TC_VALID(xname, xindex) \ 1514 { iface: SNDRV_CTL_ELEM_IFACE_PCM, name: xname, index: xindex, \ 1515 access: SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1516 info: snd_rme9652_info_tc_valid, \ 1517 get: snd_rme9652_get_tc_valid } 1518 #endif 1448 { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = xname, .index = xindex, \ 1449 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ 1450 .info = snd_rme9652_info_tc_valid, \ 1451 .get = snd_rme9652_get_tc_valid } 1519 1452 1520 1453 static int snd_rme9652_info_tc_valid(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1596 1529 1597 1530 static snd_kcontrol_new_t snd_rme9652_controls[] = { 1598 #ifdef TARGET_OS2 1599 { 1600 SNDRV_CTL_ELEM_IFACE_PCM,0,0, 1601 SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),0,0,0, 1602 snd_rme9652_control_spdif_info, 1603 snd_rme9652_control_spdif_get, 1604 snd_rme9652_control_spdif_put,0 1531 { 1532 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1533 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 1534 .info = snd_rme9652_control_spdif_info, 1535 .get = snd_rme9652_control_spdif_get, 1536 .put = snd_rme9652_control_spdif_put, 1605 1537 }, 1606 1538 { 1607 SNDRV_CTL_ELEM_IFACE_PCM,0, 0,1608 SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),0,1609 SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,0,1610 snd_rme9652_control_spdif_stream_info,1611 snd_rme9652_control_spdif_stream_get,1612 snd_rme9652_control_spdif_stream_put,01539 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 1540 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1541 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), 1542 .info = snd_rme9652_control_spdif_stream_info, 1543 .get = snd_rme9652_control_spdif_stream_get, 1544 .put = snd_rme9652_control_spdif_stream_put, 1613 1545 }, 1614 1546 { 1615 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 1616 SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),0, 1617 SNDRV_CTL_ELEM_ACCESS_READ,0, 1618 snd_rme9652_control_spdif_mask_info, 1619 snd_rme9652_control_spdif_mask_get,0, 1620 IEC958_AES0_NONAUDIO | 1621 IEC958_AES0_PROFESSIONAL | 1622 IEC958_AES0_CON_EMPHASIS 1623 }, 1624 { 1625 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 1626 SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK),0, 1627 SNDRV_CTL_ELEM_ACCESS_READ,0, 1628 snd_rme9652_control_spdif_mask_info, 1629 snd_rme9652_control_spdif_mask_get,0, 1630 IEC958_AES0_NONAUDIO | 1631 IEC958_AES0_PROFESSIONAL | 1632 IEC958_AES0_PRO_EMPHASIS 1633 }, 1634 #else 1635 { 1636 iface: SNDRV_CTL_ELEM_IFACE_PCM, 1637 name: SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 1638 info: snd_rme9652_control_spdif_info, 1639 get: snd_rme9652_control_spdif_get, 1640 put: snd_rme9652_control_spdif_put, 1641 }, 1642 { 1643 access: SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 1644 iface: SNDRV_CTL_ELEM_IFACE_PCM, 1645 name: SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), 1646 info: snd_rme9652_control_spdif_stream_info, 1647 get: snd_rme9652_control_spdif_stream_get, 1648 put: snd_rme9652_control_spdif_stream_put, 1649 }, 1650 { 1651 access: SNDRV_CTL_ELEM_ACCESS_READ, 1652 iface: SNDRV_CTL_ELEM_IFACE_MIXER, 1653 name: SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK), 1654 info: snd_rme9652_control_spdif_mask_info, 1655 get: snd_rme9652_control_spdif_mask_get, 1656 private_value: IEC958_AES0_NONAUDIO | 1547 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1548 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1549 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK), 1550 .info = snd_rme9652_control_spdif_mask_info, 1551 .get = snd_rme9652_control_spdif_mask_get, 1552 .private_value = IEC958_AES0_NONAUDIO | 1657 1553 IEC958_AES0_PROFESSIONAL | 1658 1554 IEC958_AES0_CON_EMPHASIS, 1659 1555 }, 1660 1556 { 1661 access:SNDRV_CTL_ELEM_ACCESS_READ,1662 iface:SNDRV_CTL_ELEM_IFACE_MIXER,1663 name:SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK),1664 info:snd_rme9652_control_spdif_mask_info,1665 get:snd_rme9652_control_spdif_mask_get,1666 private_value:IEC958_AES0_NONAUDIO |1667 IEC958_AES0_PROFESSIONAL |1668 IEC958_AES0_PRO_EMPHASIS,1557 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1558 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1559 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK), 1560 .info = snd_rme9652_control_spdif_mask_info, 1561 .get = snd_rme9652_control_spdif_mask_get, 1562 .private_value = IEC958_AES0_NONAUDIO | 1563 IEC958_AES0_PROFESSIONAL | 1564 IEC958_AES0_PRO_EMPHASIS, 1669 1565 }, 1670 #endif1671 1566 RME9652_SPDIF_IN("IEC958 Input Connector", 0), 1672 1567 RME9652_SPDIF_OUT("IEC958 Output also on ADAT1", 0), … … 1674 1569 RME9652_SYNC_PREF("Preferred Sync Source", 0), 1675 1570 { 1676 #ifdef TARGET_OS2 1677 SNDRV_CTL_ELEM_IFACE_PCM,0, 0, 1678 "Channels Thru", 1679 0,0,0, 1680 snd_rme9652_info_thru, 1681 snd_rme9652_get_thru, 1682 snd_rme9652_put_thru,0 1683 #else 1684 iface: SNDRV_CTL_ELEM_IFACE_PCM, 1685 name: "Channels Thru", 1686 index: 0, 1687 info: snd_rme9652_info_thru, 1688 get: snd_rme9652_get_thru, 1689 put: snd_rme9652_put_thru, 1690 #endif 1571 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1572 .name = "Channels Thru", 1573 .index = 0, 1574 .info = snd_rme9652_info_thru, 1575 .get = snd_rme9652_get_thru, 1576 .put = snd_rme9652_put_thru, 1691 1577 }, 1692 1578 RME9652_SPDIF_RATE("IEC958 Sample Rate", 0), … … 2374 2260 } 2375 2261 2376 #ifdef TARGET_OS22377 2262 static snd_pcm_hardware_t snd_rme9652_playback_subinfo = 2378 2263 { 2379 /* info: */(SNDRV_PCM_INFO_MMAP |2264 .info = (SNDRV_PCM_INFO_MMAP | 2380 2265 SNDRV_PCM_INFO_MMAP_VALID | 2381 2266 SNDRV_PCM_INFO_NONINTERLEAVED | 2382 2267 SNDRV_PCM_INFO_SYNC_START | 2383 2268 SNDRV_PCM_INFO_DOUBLE), 2384 /* formats: */SNDRV_PCM_FMTBIT_S32_LE,2385 /* rates: */(SNDRV_PCM_RATE_44100 |2269 .formats = SNDRV_PCM_FMTBIT_S32_LE, 2270 .rates = (SNDRV_PCM_RATE_44100 | 2386 2271 SNDRV_PCM_RATE_48000 | 2387 2272 SNDRV_PCM_RATE_88200 | 2388 2273 SNDRV_PCM_RATE_96000), 2389 /* rate_min: */44100,2390 /* rate_max: */96000,2391 /* channels_min: */10,2392 /* channels_max: */26,2393 /* buffer_bytes_max: */1024*1024,2394 /* period_bytes_min: */1,2395 /* period_bytes_max: */1024*1024,2396 /* periods_min: */2,2397 /* periods_max: */2,2398 /* fifo_size: */0,2274 .rate_min = 44100, 2275 .rate_max = 96000, 2276 .channels_min = 10, 2277 .channels_max = 26, 2278 .buffer_bytes_max = 1024*1024, 2279 .period_bytes_min = 1, 2280 .period_bytes_max = 1024*1024, 2281 .periods_min = 2, 2282 .periods_max = 2, 2283 .fifo_size = 0, 2399 2284 }; 2400 2285 2401 2286 static snd_pcm_hardware_t snd_rme9652_capture_subinfo = 2402 2287 { 2403 /* info: */ (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | 2288 .info = (SNDRV_PCM_INFO_MMAP | 2289 SNDRV_PCM_INFO_MMAP_VALID | 2404 2290 SNDRV_PCM_INFO_NONINTERLEAVED | 2405 2291 SNDRV_PCM_INFO_SYNC_START), 2406 /* formats: */SNDRV_PCM_FMTBIT_S32_LE,2407 /* rates: */(SNDRV_PCM_RATE_44100 |2292 .formats = SNDRV_PCM_FMTBIT_S32_LE, 2293 .rates = (SNDRV_PCM_RATE_44100 | 2408 2294 SNDRV_PCM_RATE_48000 | 2409 2295 SNDRV_PCM_RATE_88200 | 2410 2296 SNDRV_PCM_RATE_96000), 2411 /* rate_min: */44100,2412 /* rate_max: */96000,2413 /* channels_min: */10,2414 /* channels_max: */26,2415 /* buffer_bytes_max: */1024*1024,2416 /* period_bytes_min: */1,2417 /* period_bytes_max: */1024*1024,2418 /* periods_min: */2,2419 /* periods_max: */2,2420 /* fifo_size: */0,2297 .rate_min = 44100, 2298 .rate_max = 96000, 2299 .channels_min = 10, 2300 .channels_max = 26, 2301 .buffer_bytes_max = 1024*1024, 2302 .period_bytes_min = 1, 2303 .period_bytes_max = 1024*1024, 2304 .periods_min = 2, 2305 .periods_max = 2, 2306 .fifo_size = 0, 2421 2307 }; 2422 #else 2423 static snd_pcm_hardware_t snd_rme9652_playback_subinfo = 2424 { 2425 info: (SNDRV_PCM_INFO_MMAP | 2426 SNDRV_PCM_INFO_MMAP_VALID | 2427 SNDRV_PCM_INFO_NONINTERLEAVED | 2428 SNDRV_PCM_INFO_SYNC_START | 2429 SNDRV_PCM_INFO_DOUBLE), 2430 formats: SNDRV_PCM_FMTBIT_S32_LE, 2431 rates: (SNDRV_PCM_RATE_44100 | 2432 SNDRV_PCM_RATE_48000 | 2433 SNDRV_PCM_RATE_88200 | 2434 SNDRV_PCM_RATE_96000), 2435 rate_min: 44100, 2436 rate_max: 96000, 2437 channels_min: 10, 2438 channels_max: 26, 2439 buffer_bytes_max: 1024*1024, 2440 period_bytes_min: 1, 2441 period_bytes_max: 1024*1024, 2442 periods_min: 2, 2443 periods_max: 2, 2444 fifo_size: 0, 2308 2309 static unsigned int period_sizes[] = { 64, 128, 256, 512, 1024, 2048, 4096, 8192 }; 2310 2311 #define PERIOD_SIZES sizeof(period_sizes) / sizeof(period_sizes[0]) 2312 2313 static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = { 2314 .count = PERIOD_SIZES, 2315 .list = period_sizes, 2316 .mask = 0 2445 2317 }; 2446 2447 static snd_pcm_hardware_t snd_rme9652_capture_subinfo =2448 {2449 info: (SNDRV_PCM_INFO_MMAP |2450 SNDRV_PCM_INFO_MMAP_VALID |2451 SNDRV_PCM_INFO_NONINTERLEAVED |2452 SNDRV_PCM_INFO_SYNC_START),2453 formats: SNDRV_PCM_FMTBIT_S32_LE,2454 rates: (SNDRV_PCM_RATE_44100 |2455 SNDRV_PCM_RATE_48000 |2456 SNDRV_PCM_RATE_88200 |2457 SNDRV_PCM_RATE_96000),2458 rate_min: 44100,2459 rate_max: 96000,2460 channels_min: 10,2461 channels_max: 26,2462 buffer_bytes_max: 1024*1024,2463 period_bytes_min: 1,2464 period_bytes_max: 1024*1024,2465 periods_min: 2,2466 periods_max: 2,2467 fifo_size: 0,2468 };2469 #endif2470 2471 static unsigned int period_sizes[] = { 64, 128, 256, 512, 1024, 2048, 4096, 8192 };2472 2473 #define PERIOD_SIZES sizeof(period_sizes) / sizeof(period_sizes[0])2474 2475 #ifdef TARGET_OS22476 static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = {2477 PERIOD_SIZES,2478 period_sizes,2479 02480 };2481 #else2482 static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = {2483 count: PERIOD_SIZES,2484 list: period_sizes,2485 mask: 02486 };2487 #endif2488 2318 2489 2319 static int snd_rme9652_hw_rule_channels(snd_pcm_hw_params_t *params, … … 2689 2519 } 2690 2520 2691 #ifdef TARGET_OS22692 2521 static snd_pcm_ops_t snd_rme9652_playback_ops = { 2693 /* open: */ snd_rme9652_playback_open, 2694 /* close: */ snd_rme9652_playback_release, 2695 /* ioctl: */ snd_rme9652_ioctl, 2696 /* hw_params: */ snd_rme9652_hw_params, 2697 0, 2698 /* prepare: */ snd_rme9652_prepare, 2699 /* trigger: */ snd_rme9652_trigger, 2700 /* pointer: */ snd_rme9652_hw_pointer, 2701 /* copy: */ snd_rme9652_playback_copy, 2702 /* silence: */ snd_rme9652_hw_silence, 2522 .open = snd_rme9652_playback_open, 2523 .close = snd_rme9652_playback_release, 2524 .ioctl = snd_rme9652_ioctl, 2525 .hw_params = snd_rme9652_hw_params, 2526 .prepare = snd_rme9652_prepare, 2527 .trigger = snd_rme9652_trigger, 2528 .pointer = snd_rme9652_hw_pointer, 2529 .copy = snd_rme9652_playback_copy, 2530 .silence = snd_rme9652_hw_silence, 2703 2531 }; 2704 2532 2705 2533 static snd_pcm_ops_t snd_rme9652_capture_ops = { 2706 /* open: */ snd_rme9652_capture_open, 2707 /* close: */ snd_rme9652_capture_release, 2708 /* ioctl: */ snd_rme9652_ioctl, 2709 /* hw_params: */ snd_rme9652_hw_params, 2710 0, 2711 /* prepare: */ snd_rme9652_prepare, 2712 /* trigger: */ snd_rme9652_trigger, 2713 /* pointer: */ snd_rme9652_hw_pointer, 2714 /* copy: */ snd_rme9652_capture_copy, 2715 0 2534 .open = snd_rme9652_capture_open, 2535 .close = snd_rme9652_capture_release, 2536 .ioctl = snd_rme9652_ioctl, 2537 .hw_params = snd_rme9652_hw_params, 2538 .prepare = snd_rme9652_prepare, 2539 .trigger = snd_rme9652_trigger, 2540 .pointer = snd_rme9652_hw_pointer, 2541 .copy = snd_rme9652_capture_copy, 2716 2542 }; 2717 #else2718 static snd_pcm_ops_t snd_rme9652_playback_ops = {2719 open: snd_rme9652_playback_open,2720 close: snd_rme9652_playback_release,2721 ioctl: snd_rme9652_ioctl,2722 hw_params: snd_rme9652_hw_params,2723 prepare: snd_rme9652_prepare,2724 trigger: snd_rme9652_trigger,2725 pointer: snd_rme9652_hw_pointer,2726 copy: snd_rme9652_playback_copy,2727 silence: snd_rme9652_hw_silence,2728 };2729 2730 static snd_pcm_ops_t snd_rme9652_capture_ops = {2731 open: snd_rme9652_capture_open,2732 close: snd_rme9652_capture_release,2733 ioctl: snd_rme9652_ioctl,2734 hw_params: snd_rme9652_hw_params,2735 prepare: snd_rme9652_prepare,2736 trigger: snd_rme9652_trigger,2737 pointer: snd_rme9652_hw_pointer,2738 copy: snd_rme9652_capture_copy,2739 };2740 #endif2741 2543 2742 2544 static int __init snd_rme9652_create_pcm(snd_card_t *card, … … 2958 2760 } 2959 2761 2960 #ifdef TARGET_OS22961 2762 static struct pci_driver driver = { 2962 0, 0,"RME Digi9652 (Hammerfall)",2963 snd_rme9652_ids,2964 snd_rme9652_probe,2965 snd_rme9652_remove,0,02763 .name ="RME Digi9652 (Hammerfall)", 2764 .id_table = snd_rme9652_ids, 2765 .probe = snd_rme9652_probe, 2766 .remove = __devexit_p(snd_rme9652_remove), 2966 2767 }; 2967 #else2968 static struct pci_driver driver = {2969 name:"RME Digi9652 (Hammerfall)",2970 id_table:snd_rme9652_ids,2971 probe:snd_rme9652_probe,2972 remove:__devexit_p(snd_rme9652_remove),2973 };2974 #endif2975 2768 2976 2769 static int __init alsa_card_hammerfall_init(void)  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/sonicvibes.c
r207 r210 776 776 } 777 777 778 #ifdef TARGET_OS2779 778 static snd_pcm_hardware_t snd_sonicvibes_playback = 780 779 { 781 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |780 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 782 781 SNDRV_PCM_INFO_BLOCK_TRANSFER | 783 782 SNDRV_PCM_INFO_MMAP_VALID), 784 /* formats: */SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,785 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,786 /* rate_min: */4000,787 /* rate_max: */48000,788 /* channels_min: */1,789 /* channels_max: */2,790 /* buffer_bytes_max: */(128*1024),791 /* period_bytes_min: */32,792 /* period_bytes_max: */(128*1024),793 /* periods_min: */1,794 /* periods_max: */1024,795 /* fifo_size: */0,783 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, 784 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 785 .rate_min = 4000, 786 .rate_max = 48000, 787 .channels_min = 1, 788 .channels_max = 2, 789 .buffer_bytes_max = (128*1024), 790 .period_bytes_min = 32, 791 .period_bytes_max = (128*1024), 792 .periods_min = 1, 793 .periods_max = 1024, 794 .fifo_size = 0, 796 795 }; 797 796 798 797 static snd_pcm_hardware_t snd_sonicvibes_capture = 799 798 { 800 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |799 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 801 800 SNDRV_PCM_INFO_BLOCK_TRANSFER | 802 801 SNDRV_PCM_INFO_MMAP_VALID), 803 /* formats: */SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,804 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,805 /* rate_min: */4000,806 /* rate_max: */48000,807 /* channels_min: */1,808 /* channels_max: */2,809 /* buffer_bytes_max: */(128*1024),810 /* period_bytes_min: */32,811 /* period_bytes_max: */(128*1024),812 /* periods_min: */1,813 /* periods_max: */1024,814 /* fifo_size: */0,802 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, 803 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 804 .rate_min = 4000, 805 .rate_max = 48000, 806 .channels_min = 1, 807 .channels_max = 2, 808 .buffer_bytes_max = (128*1024), 809 .period_bytes_min = 32, 810 .period_bytes_max = (128*1024), 811 .periods_min = 1, 812 .periods_max = 1024, 813 .fifo_size = 0, 815 814 }; 816 #else817 static snd_pcm_hardware_t snd_sonicvibes_playback =818 {819 info: (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |820 SNDRV_PCM_INFO_BLOCK_TRANSFER |821 SNDRV_PCM_INFO_MMAP_VALID),822 formats: SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,823 rates: SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,824 rate_min: 4000,825 rate_max: 48000,826 channels_min: 1,827 channels_max: 2,828 buffer_bytes_max: (128*1024),829 period_bytes_min: 32,830 period_bytes_max: (128*1024),831 periods_min: 1,832 periods_max: 1024,833 fifo_size: 0,834 };835 836 static snd_pcm_hardware_t snd_sonicvibes_capture =837 {838 info: (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |839 SNDRV_PCM_INFO_BLOCK_TRANSFER |840 SNDRV_PCM_INFO_MMAP_VALID),841 formats: SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,842 rates: SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,843 rate_min: 4000,844 rate_max: 48000,845 channels_min: 1,846 channels_max: 2,847 buffer_bytes_max: (128*1024),848 period_bytes_min: 32,849 period_bytes_max: (128*1024),850 periods_min: 1,851 periods_max: 1024,852 fifo_size: 0,853 };854 #endif855 815 856 816 static int snd_sonicvibes_playback_open(snd_pcm_substream_t * substream) … … 897 857 } 898 858 899 900 #ifdef TARGET_OS2901 859 static snd_pcm_ops_t snd_sonicvibes_playback_ops = { 902 /* open: */ snd_sonicvibes_playback_open, 903 /* close: */ snd_sonicvibes_playback_close, 904 /* ioctl: */ snd_pcm_lib_ioctl, 905 /* hw_params:*/ snd_sonicvibes_hw_params, 906 /* hw_free: */ snd_sonicvibes_hw_free, 907 /* prepare: */ snd_sonicvibes_playback_prepare, 908 /* trigger: */ snd_sonicvibes_playback_trigger, 909 /* pointer: */ snd_sonicvibes_playback_pointer, 910 0, 0 860 .open = snd_sonicvibes_playback_open, 861 .close = snd_sonicvibes_playback_close, 862 .ioctl = snd_pcm_lib_ioctl, 863 .hw_params = snd_sonicvibes_hw_params, 864 .hw_free = snd_sonicvibes_hw_free, 865 .prepare = snd_sonicvibes_playback_prepare, 866 .trigger = snd_sonicvibes_playback_trigger, 867 .pointer = snd_sonicvibes_playback_pointer, 911 868 }; 912 869 913 870 static snd_pcm_ops_t snd_sonicvibes_capture_ops = { 914 /* open: */ snd_sonicvibes_capture_open, 915 /* close: */ snd_sonicvibes_capture_close, 916 /* ioctl: */ snd_pcm_lib_ioctl, 917 /* hw_params:*/ snd_sonicvibes_hw_params, 918 /* hw_free: */ snd_sonicvibes_hw_free, 919 /* prepare: */ snd_sonicvibes_capture_prepare, 920 /* trigger: */ snd_sonicvibes_capture_trigger, 921 /* pointer: */ snd_sonicvibes_capture_pointer, 922 0, 0 871 .open = snd_sonicvibes_capture_open, 872 .close = snd_sonicvibes_capture_close, 873 .ioctl = snd_pcm_lib_ioctl, 874 .hw_params = snd_sonicvibes_hw_params, 875 .hw_free = snd_sonicvibes_hw_free, 876 .prepare = snd_sonicvibes_capture_prepare, 877 .trigger = snd_sonicvibes_capture_trigger, 878 .pointer = snd_sonicvibes_capture_pointer, 923 879 }; 924 #else925 static snd_pcm_ops_t snd_sonicvibes_playback_ops = {926 open: snd_sonicvibes_playback_open,927 close: snd_sonicvibes_playback_close,928 ioctl: snd_pcm_lib_ioctl,929 hw_params: snd_sonicvibes_hw_params,930 hw_free: snd_sonicvibes_hw_free,931 prepare: snd_sonicvibes_playback_prepare,932 trigger: snd_sonicvibes_playback_trigger,933 pointer: snd_sonicvibes_playback_pointer,934 };935 936 static snd_pcm_ops_t snd_sonicvibes_capture_ops = {937 open: snd_sonicvibes_capture_open,938 close: snd_sonicvibes_capture_close,939 ioctl: snd_pcm_lib_ioctl,940 hw_params: snd_sonicvibes_hw_params,941 hw_free: snd_sonicvibes_hw_free,942 prepare: snd_sonicvibes_capture_prepare,943 trigger: snd_sonicvibes_capture_trigger,944 pointer: snd_sonicvibes_capture_pointer,945 };946 #endif947 880 948 881 static void snd_sonicvibes_pcm_free(snd_pcm_t *pcm) … … 981 914 */ 982 915 983 #ifdef TARGET_OS2984 916 #define SONICVIBES_MUX(xname, xindex) \ 985 { SNDRV_CTL_ELEM_IFACE_MIXER, 0, 0, xname, xindex, \ 986 0, 0,snd_sonicvibes_info_mux, \ 987 snd_sonicvibes_get_mux, snd_sonicvibes_put_mux, 0} 988 #else 989 #define SONICVIBES_MUX(xname, xindex) \ 990 { iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex, \ 991 info: snd_sonicvibes_info_mux, \ 992 get: snd_sonicvibes_get_mux, put: snd_sonicvibes_put_mux } 993 #endif 917 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ 918 .info = snd_sonicvibes_info_mux, \ 919 .get = snd_sonicvibes_get_mux, .put = snd_sonicvibes_put_mux } 994 920 995 921 static int snd_sonicvibes_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1044 970 } 1045 971 1046 #ifdef TARGET_OS21047 972 #define SONICVIBES_SINGLE(xname, xindex, reg, shift, mask, invert) \ 1048 { SNDRV_CTL_ELEM_IFACE_MIXER, 0, 0, xname, xindex, \ 1049 0, 0, snd_sonicvibes_info_single, \ 1050 snd_sonicvibes_get_single, snd_sonicvibes_put_single, \ 1051 reg | (shift << 8) | (mask << 16) | (invert << 24) } 1052 #else 1053 #define SONICVIBES_SINGLE(xname, xindex, reg, shift, mask, invert) \ 1054 { iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex, \ 1055 info: snd_sonicvibes_info_single, \ 1056 get: snd_sonicvibes_get_single, put: snd_sonicvibes_put_single, \ 1057 private_value: reg | (shift << 8) | (mask << 16) | (invert << 24) } 1058 #endif 973 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ 974 .info = snd_sonicvibes_info_single, \ 975 .get = snd_sonicvibes_get_single, .put = snd_sonicvibes_put_single, \ 976 .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) } 1059 977 1060 978 static int snd_sonicvibes_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1110 1028 } 1111 1029 1112 #ifdef TARGET_OS21113 1030 #define SONICVIBES_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert) \ 1114 { SNDRV_CTL_ELEM_IFACE_MIXER, 0, 0, xname, xindex, \ 1115 0, 0, snd_sonicvibes_info_double, \ 1116 snd_sonicvibes_get_double, snd_sonicvibes_put_double, \ 1117 left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } 1118 #else 1119 #define SONICVIBES_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert) \ 1120 { iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex, \ 1121 info: snd_sonicvibes_info_double, \ 1122 get: snd_sonicvibes_get_double, put: snd_sonicvibes_put_double, \ 1123 private_value: left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } 1124 #endif 1031 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ 1032 .info = snd_sonicvibes_info_double, \ 1033 .get = snd_sonicvibes_get_double, .put = snd_sonicvibes_put_double, \ 1034 .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } 1125 1035 1126 1036 static int snd_sonicvibes_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1365 1275 unsigned int dmaa, dmac; 1366 1276 int err; 1367 #ifdef TARGET_OS21368 1277 static snd_device_ops_t ops = { 1369 snd_sonicvibes_dev_free,0,0,01278 .dev_free = snd_sonicvibes_dev_free, 1370 1279 }; 1371 #else1372 static snd_device_ops_t ops = {1373 dev_free: snd_sonicvibes_dev_free,1374 };1375 #endif1376 1280 1377 1281 *rsonic = NULL; … … 1652 1556 1653 1557 static struct pci_driver driver = { 1654 #ifdef TARGET_OS2 1655 0, 0, 0, 1656 "S3 SonicVibes", 1657 snd_sonic_ids, 1658 snd_sonic_probe, 1659 snd_sonic_remove, 1660 0, 0 1661 #else 1662 name: "S3 SonicVibes", 1663 id_table: snd_sonic_ids, 1664 probe: snd_sonic_probe, 1665 remove: __devexit_p(snd_sonic_remove), 1666 #endif 1558 .name = "S3 SonicVibes", 1559 .id_table = snd_sonic_ids, 1560 .probe = snd_sonic_probe, 1561 .remove = __devexit_p(snd_sonic_remove), 1667 1562 }; 1668 1563  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident.c
r207 r210 187 187 188 188 static struct pci_driver driver = { 189 0, 0, 0, "Trident4DWaveAudio", 190 snd_trident_ids, 191 snd_trident_probe, 192 snd_trident_remove, 193 SND_PCI_PM_CALLBACKS 194 }; 189 .name = "Trident4DWaveAudio", 190 .id_table = snd_trident_ids, 191 .probe = snd_trident_probe, 192 .remove = __devexit_p(snd_trident_remove), 193 #ifdef CONFIG_PM 194 .suspend = snd_trident_suspend, 195 .resume = snd_trident_resume, 196 #endif 197 }; 195 198 196 199 static int __init alsa_card_trident_init(void)  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident_main.c
r207 r210 28 28 */ 29 29 30 #define __NO_VERSION__31 30 #include <sound/driver.h> 32 31 #include <asm/io.h> … … 1676 1675 static snd_pcm_hardware_t snd_trident_playback = 1677 1676 { 1678 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1677 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1679 1678 SNDRV_PCM_INFO_BLOCK_TRANSFER | 1680 1679 SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_SYNC_START | 1681 SNDRV_PCM_INFO_PAUSE /* | SNDRV_PCM_INFO_RESUME */),1682 /* formats: */(SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE |1680 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME), 1681 .formats = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE | 1683 1682 SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U16_LE), 1684 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,1685 /* rate_min: */4000,1686 /* rate_max: */48000,1687 /* channels_min: */1,1688 /* channels_max: */2,1689 /* buffer_bytes_max: */(256*1024),1690 /* period_bytes_min: */64,1691 /* period_bytes_max: */(256*1024),1692 /* periods_min: */1,1693 /* periods_max: */1024,1694 /* fifo_size: */0,1683 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 1684 .rate_min = 4000, 1685 .rate_max = 48000, 1686 .channels_min = 1, 1687 .channels_max = 2, 1688 .buffer_bytes_max = (256*1024), 1689 .period_bytes_min = 64, 1690 .period_bytes_max = (256*1024), 1691 .periods_min = 1, 1692 .periods_max = 1024, 1693 .fifo_size = 0, 1695 1694 }; 1696 1695 … … 1701 1700 static snd_pcm_hardware_t snd_trident_capture = 1702 1701 { 1703 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1702 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1704 1703 SNDRV_PCM_INFO_BLOCK_TRANSFER | 1705 1704 SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_SYNC_START | 1706 SNDRV_PCM_INFO_PAUSE /* | SNDRV_PCM_INFO_RESUME */),1707 /* formats: */(SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE |1705 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME), 1706 .formats = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE | 1708 1707 SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U16_LE), 1709 /* rates: */SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,1710 /* rate_min: */4000,1711 /* rate_max: */48000,1712 /* channels_min: */1,1713 /* channels_max: */2,1714 /* buffer_bytes_max: */(128*1024),1715 /* period_bytes_min: */64,1716 /* period_bytes_max: */(128*1024),1717 /* periods_min: */1,1718 /* periods_max: */1024,1719 /* fifo_size: */0,1708 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 1709 .rate_min = 4000, 1710 .rate_max = 48000, 1711 .channels_min = 1, 1712 .channels_max = 2, 1713 .buffer_bytes_max = (128*1024), 1714 .period_bytes_min = 64, 1715 .period_bytes_max = (128*1024), 1716 .periods_min = 1, 1717 .periods_max = 1024, 1718 .fifo_size = 0, 1720 1719 }; 1721 1720 … … 1726 1725 static snd_pcm_hardware_t snd_trident_foldback = 1727 1726 { 1728 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1727 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1729 1728 SNDRV_PCM_INFO_BLOCK_TRANSFER | 1730 1729 SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_SYNC_START | 1731 SNDRV_PCM_INFO_PAUSE /* | SNDRV_PCM_INFO_RESUME */),1732 /* formats: */SNDRV_PCM_FMTBIT_S16_LE,1733 /* rates: */SNDRV_PCM_RATE_48000,1734 /* rate_min: */48000,1735 /* rate_max: */48000,1736 /* channels_min: */2,1737 /* channels_max: */2,1738 /* buffer_bytes_max: */(128*1024),1739 /* period_bytes_min: */64,1740 /* period_bytes_max: */(128*1024),1741 /* periods_min: */1,1742 /* periods_max: */1024,1743 /* fifo_size: */0,1730 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME), 1731 .formats = SNDRV_PCM_FMTBIT_S16_LE, 1732 .rates = SNDRV_PCM_RATE_48000, 1733 .rate_min = 48000, 1734 .rate_max = 48000, 1735 .channels_min = 2, 1736 .channels_max = 2, 1737 .buffer_bytes_max = (128*1024), 1738 .period_bytes_min = 64, 1739 .period_bytes_max = (128*1024), 1740 .periods_min = 1, 1741 .periods_max = 1024, 1742 .fifo_size = 0, 1744 1743 }; 1745 1744 … … 1750 1749 static snd_pcm_hardware_t snd_trident_spdif = 1751 1750 { 1752 /* info: */(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |1751 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1753 1752 SNDRV_PCM_INFO_BLOCK_TRANSFER | 1754 1753 SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_SYNC_START | 1755 SNDRV_PCM_INFO_PAUSE /* | SNDRV_PCM_INFO_RESUME */),1756 /* formats: */SNDRV_PCM_FMTBIT_S16_LE,1757 /* rates: */(SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |1754 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME), 1755 .formats = SNDRV_PCM_FMTBIT_S16_LE, 1756 .rates = (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | 1758 1757 SNDRV_PCM_RATE_48000), 1759 /* rate_min: */32000,1760 /* rate_max: */48000,1761 /* channels_min: */2,1762 /* channels_max: */2,1763 /* buffer_bytes_max: */(128*1024),1764 /* period_bytes_min: */64,1765 /* period_bytes_max: */(128*1024),1766 /* periods_min: */1,1767 /* periods_max: */1024,1768 /* fifo_size: */0,1758 .rate_min = 32000, 1759 .rate_max = 48000, 1760 .channels_min = 2, 1761 .channels_max = 2, 1762 .buffer_bytes_max = (128*1024), 1763 .period_bytes_min = 64, 1764 .period_bytes_max = (128*1024), 1765 .periods_min = 1, 1766 .periods_max = 1024, 1767 .fifo_size = 0, 1769 1768 }; 1770 1769 … … 2018 2017 2019 2018 static snd_pcm_ops_t snd_trident_playback_ops = { 2020 snd_trident_playback_open,2021 snd_trident_playback_close,2022 snd_trident_ioctl,2023 snd_trident_hw_params,2024 snd_trident_hw_free,2025 snd_trident_playback_prepare,2026 snd_trident_trigger,2027 snd_trident_playback_pointer,0,0 2019 .open = snd_trident_playback_open, 2020 .close = snd_trident_playback_close, 2021 .ioctl = snd_trident_ioctl, 2022 .hw_params = snd_trident_hw_params, 2023 .hw_free = snd_trident_hw_free, 2024 .prepare = snd_trident_playback_prepare, 2025 .trigger = snd_trident_trigger, 2026 .pointer = snd_trident_playback_pointer, 2028 2027 }; 2029 2028 … … 2041 2040 2042 2041 static snd_pcm_ops_t snd_trident_capture_ops = { 2043 snd_trident_capture_open,2044 snd_trident_capture_close,2045 snd_trident_ioctl,2046 snd_trident_capture_hw_params,2047 snd_trident_hw_free,2048 snd_trident_capture_prepare,2049 snd_trident_trigger,2050 snd_trident_capture_pointer,0,0 2042 .open = snd_trident_capture_open, 2043 .close = snd_trident_capture_close, 2044 .ioctl = snd_trident_ioctl, 2045 .hw_params = snd_trident_capture_hw_params, 2046 .hw_free = snd_trident_hw_free, 2047 .prepare = snd_trident_capture_prepare, 2048 .trigger = snd_trident_trigger, 2049 .pointer = snd_trident_capture_pointer, 2051 2050 }; 2052 2051 2053 2052 static snd_pcm_ops_t snd_trident_si7018_capture_ops = { 2054 snd_trident_capture_open,2055 snd_trident_capture_close,2056 snd_trident_ioctl,2057 snd_trident_si7018_capture_hw_params,2058 snd_trident_si7018_capture_hw_free,2059 snd_trident_si7018_capture_prepare,2060 snd_trident_trigger,2061 snd_trident_playback_pointer,0,0 2053 .open = snd_trident_capture_open, 2054 .close = snd_trident_capture_close, 2055 .ioctl = snd_trident_ioctl, 2056 .hw_params = snd_trident_si7018_capture_hw_params, 2057 .hw_free = snd_trident_si7018_capture_hw_free, 2058 .prepare = snd_trident_si7018_capture_prepare, 2059 .trigger = snd_trident_trigger, 2060 .pointer = snd_trident_playback_pointer, 2062 2061 }; 2063 2062 2064 2063 static snd_pcm_ops_t snd_trident_foldback_ops = { 2065 snd_trident_foldback_open,2066 snd_trident_foldback_close,2067 snd_trident_ioctl,2068 snd_trident_hw_params,2069 snd_trident_hw_free,2070 snd_trident_foldback_prepare,2071 snd_trident_trigger,2072 snd_trident_playback_pointer,0,0 2064 .open = snd_trident_foldback_open, 2065 .close = snd_trident_foldback_close, 2066 .ioctl = snd_trident_ioctl, 2067 .hw_params = snd_trident_hw_params, 2068 .hw_free = snd_trident_hw_free, 2069 .prepare = snd_trident_foldback_prepare, 2070 .trigger = snd_trident_trigger, 2071 .pointer = snd_trident_playback_pointer, 2073 2072 }; 2074 2073 … … 2086 2085 2087 2086 static snd_pcm_ops_t snd_trident_spdif_ops = { 2088 snd_trident_spdif_open,2089 snd_trident_spdif_close,2090 snd_trident_ioctl,2091 snd_trident_spdif_hw_params,2092 snd_trident_hw_free,2093 snd_trident_spdif_prepare,2094 snd_trident_trigger,2095 snd_trident_spdif_pointer,0,0 2087 .open = snd_trident_spdif_open, 2088 .close = snd_trident_spdif_close, 2089 .ioctl = snd_trident_ioctl, 2090 .hw_params = snd_trident_spdif_hw_params, 2091 .hw_free = snd_trident_hw_free, 2092 .prepare = snd_trident_spdif_prepare, 2093 .trigger = snd_trident_trigger, 2094 .pointer = snd_trident_spdif_pointer, 2096 2095 }; 2097 2096 … … 2358 2357 static snd_kcontrol_new_t snd_trident_spdif_control __devinitdata = 2359 2358 { 2360 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 2361 SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH),0,0,0, 2362 snd_trident_spdif_control_info, 2363 snd_trident_spdif_control_get, 2364 snd_trident_spdif_control_put, 2365 0, 2366 0x28, 2359 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2360 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH), 2361 .info = snd_trident_spdif_control_info, 2362 .get = snd_trident_spdif_control_get, 2363 .put = snd_trident_spdif_control_put, 2364 .private_value = 0x28, 2367 2365 }; 2368 2366 … … 2421 2419 static snd_kcontrol_new_t snd_trident_spdif_default __devinitdata = 2422 2420 { 2423 SNDRV_CTL_ELEM_IFACE_PCM,0,0,2424 SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),0,0,0,2425 snd_trident_spdif_default_info,2426 snd_trident_spdif_default_get,2427 snd_trident_spdif_default_put,0 2421 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2422 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 2423 .info = snd_trident_spdif_default_info, 2424 .get = snd_trident_spdif_default_get, 2425 .put = snd_trident_spdif_default_put 2428 2426 }; 2429 2427 … … 2453 2451 static snd_kcontrol_new_t snd_trident_spdif_mask __devinitdata = 2454 2452 { 2455 SNDRV_CTL_ELEM_IFACE_PCM,0,0,2456 SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),0,2457 SNDRV_CTL_ELEM_ACCESS_READ,0,2458 snd_trident_spdif_mask_info,2459 snd_trident_spdif_mask_get,0,0 2453 .access = SNDRV_CTL_ELEM_ACCESS_READ, 2454 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2455 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK), 2456 .info = snd_trident_spdif_mask_info, 2457 .get = snd_trident_spdif_mask_get, 2460 2458 }; 2461 2459 … … 2514 2512 static snd_kcontrol_new_t snd_trident_spdif_stream __devinitdata = 2515 2513 { 2516 SNDRV_CTL_ELEM_IFACE_PCM,0,0,2517 SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),0,2518 SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,0,2519 snd_trident_spdif_stream_info,2520 snd_trident_spdif_stream_get,2521 snd_trident_spdif_stream_put,0 2514 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 2515 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2516 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), 2517 .info = snd_trident_spdif_stream_info, 2518 .get = snd_trident_spdif_stream_get, 2519 .put = snd_trident_spdif_stream_put 2522 2520 }; 2523 2521 … … 2571 2569 static snd_kcontrol_new_t snd_trident_ac97_rear_control __devinitdata = 2572 2570 { 2573 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 2574 "Rear Path",0,0,0, 2575 snd_trident_ac97_control_info, 2576 snd_trident_ac97_control_get, 2577 snd_trident_ac97_control_put, 2578 0, 2579 4, 2571 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2572 .name = "Rear Path", 2573 .info = snd_trident_ac97_control_info, 2574 .get = snd_trident_ac97_control_get, 2575 .put = snd_trident_ac97_control_put, 2576 .private_value = 4, 2580 2577 }; 2581 2578 … … 2628 2625 static snd_kcontrol_new_t snd_trident_vol_music_control __devinitdata = 2629 2626 { 2630 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 2631 "Music Playback Volume",0,0,0, 2632 snd_trident_vol_control_info, 2633 snd_trident_vol_control_get, 2634 snd_trident_vol_control_put, 2635 0, // tlv 2636 16 // private 2627 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2628 .name = "Music Playback Volume", 2629 .info = snd_trident_vol_control_info, 2630 .get = snd_trident_vol_control_get, 2631 .put = snd_trident_vol_control_put, 2632 .private_value = 16, 2637 2633 }; 2638 2634 … … 2640 2636 static snd_kcontrol_new_t snd_trident_vol_wave_control __devinitdata = 2641 2637 { 2642 SNDRV_CTL_ELEM_IFACE_MIXER,0,0,2643 "Wave Playback Volume",0,0,0,2644 snd_trident_vol_control_info,2645 snd_trident_vol_control_get,2646 snd_trident_vol_control_put,2647 0,2638 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2639 .name = "Wave Playback Volume", 2640 .info = snd_trident_vol_control_info, 2641 .get = snd_trident_vol_control_get, 2642 .put = snd_trident_vol_control_put, 2643 .private_value = 0, 2648 2644 }; 2649 2645 … … 2705 2701 static snd_kcontrol_new_t snd_trident_pcm_vol_control __devinitdata = 2706 2702 { 2707 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 2708 "PCM Front Playback Volume",0, 2709 SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 2710 32, 2711 snd_trident_pcm_vol_control_info, 2712 snd_trident_pcm_vol_control_get, 2713 snd_trident_pcm_vol_control_put,0 2703 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2704 .name = "PCM Front Playback Volume", 2705 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 2706 .info = snd_trident_pcm_vol_control_info, 2707 .get = snd_trident_pcm_vol_control_get, 2708 .put = snd_trident_pcm_vol_control_put, 2714 2709 }; 2715 2710 … … 2767 2762 static snd_kcontrol_new_t snd_trident_pcm_pan_control __devinitdata = 2768 2763 { 2769 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 2770 "PCM Pan Playback Control",0, 2771 SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 2772 32, 2773 snd_trident_pcm_pan_control_info, 2774 snd_trident_pcm_pan_control_get, 2775 snd_trident_pcm_pan_control_put,0 2764 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2765 .name = "PCM Pan Playback Control", 2766 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 2767 .info = snd_trident_pcm_pan_control_info, 2768 .get = snd_trident_pcm_pan_control_get, 2769 .put = snd_trident_pcm_pan_control_put, 2776 2770 }; 2777 2771 … … 2821 2815 static snd_kcontrol_new_t snd_trident_pcm_rvol_control __devinitdata = 2822 2816 { 2823 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 2824 "PCM Reverb Playback Volume",0, 2825 SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 2826 32, 2827 snd_trident_pcm_rvol_control_info, 2828 snd_trident_pcm_rvol_control_get, 2829 snd_trident_pcm_rvol_control_put,0 2817 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2818 .name = "PCM Reverb Playback Volume", 2819 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 2820 .info = snd_trident_pcm_rvol_control_info, 2821 .get = snd_trident_pcm_rvol_control_get, 2822 .put = snd_trident_pcm_rvol_control_put, 2830 2823 }; 2831 2824 … … 2875 2868 static snd_kcontrol_new_t snd_trident_pcm_cvol_control __devinitdata = 2876 2869 { 2877 SNDRV_CTL_ELEM_IFACE_MIXER,0,0, 2878 "PCM Chorus Playback Volume",0, 2879 SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 2880 32, 2881 snd_trident_pcm_cvol_control_info, 2882 snd_trident_pcm_cvol_control_get, 2883 snd_trident_pcm_cvol_control_put,0 2870 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2871 .name = "PCM Chorus Playback Volume", 2872 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 2873 .info = snd_trident_pcm_cvol_control_info, 2874 .get = snd_trident_pcm_cvol_control_get, 2875 .put = snd_trident_pcm_cvol_control_put, 2884 2876 }; 2885 2877 … … 3524 3516 #ifdef TARGET_OS2 3525 3517 static snd_device_ops_t ops = { 3526 snd_trident_dev_free,0,0,0 3518 .dev_free = snd_trident_dev_free, 3527 3519 }; 3528 3520 #endif  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident_memory.c
r106 r210 24 24 */ 25 25 26 #define __NO_VERSION__27 26 #include <sound/driver.h> 28 27 #include <asm/io.h>  - 
      
GPL/branches/alsa-resync1/alsa-kernel/pci/ymfpci/ymfpci_main.c
r207 r210 25 25 */ 26 26 27 #define __NO_VERSION__28 27 #include <sound/driver.h> 29 28 #include <asm/io.h> … … 32 31 #include <linux/pci.h> 33 32 #include <linux/slab.h> 33 #include <linux/vmalloc.h> 34 34 #include <sound/core.h> 35 35 #include <sound/control.h> … … 785 785 static snd_pcm_hardware_t snd_ymfpci_playback = 786 786 { 787 /* info: */ (SNDRV_PCM_INFO_MMAP | 787 .info = (SNDRV_PCM_INFO_MMAP | 788 SNDRV_PCM_INFO_MMAP_VALID | 789 SNDRV_PCM_INFO_INTERLEAVED | 790 SNDRV_PCM_INFO_BLOCK_TRANSFER | 791 SNDRV_PCM_INFO_PAUSE | 792 SNDRV_PCM_INFO_RESUME), 793 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, 794 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 795 .rate_min = 8000, 796 .rate_max = 48000, 797 .channels_min = 1, 798 .channels_max = 2, 799 .buffer_bytes_max = 256 * 1024, /* FIXME: enough? */ 800 .period_bytes_min = 64, 801 .period_bytes_max = 256 * 1024, /* FIXME: enough? */ 802 .periods_min = 3, 803 .periods_max = 1024, 804 .fifo_size = 0, 805 }; 806 807 static snd_pcm_hardware_t snd_ymfpci_capture = 808 { 809 .info = (SNDRV_PCM_INFO_MMAP | 788 810 SNDRV_PCM_INFO_MMAP_VALID | 789 811 SNDRV_PCM_INFO_INTERLEAVED | … … 791 813 SNDRV_PCM_INFO_PAUSE | 792 814 SNDRV_PCM_INFO_RESUME), 793 /* formats: */ SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, 794 /* rates: */ SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 795 /* rate_min: */ 8000, 796 /* rate_max: */ 48000, 797 /* channels_min: */ 1, 798 /* channels_max: */ 2, 799 /* buffer_bytes_max: */ 256 * 1024, /* FIXME: enough? */ 800 /* period_bytes_min: */ 64, 801 /* period_bytes_max: */ 256 * 1024, /* FIXME: enough? */ 802 /* periods_min: */ 3, 803 /* periods_max: */ 1024, 804 /* fifo_size: */ 0, 805 }; 806 807 static snd_pcm_hardware_t snd_ymfpci_capture = 808 { 809 /* info: */ (SNDRV_PCM_INFO_MMAP | 810 SNDRV_PCM_INFO_MMAP_VALID | 811 SNDRV_PCM_INFO_INTERLEAVED | 812 SNDRV_PCM_INFO_BLOCK_TRANSFER | 813 SNDRV_PCM_INFO_PAUSE | 814 SNDRV_PCM_INFO_RESUME), 815 /* formats: */ SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, 816 /* rates: */ SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 817 /* rate_min: */ 8000, 818 /* rate_max: */ 48000, 819 /* channels_min: */ 1, 820 /* channels_max: */ 2, 821 /* buffer_bytes_max: */ 256 * 1024, /* FIXME: enough? */ 822 /* period_bytes_min: */ 64, 823 /* period_bytes_max: */ 256 * 1024, /* FIXME: enough? */ 824 /* periods_min: */ 3, 825 /* periods_max: */ 1024, 826 /* fifo_size: */ 0, 815 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, 816 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 817 .rate_min = 8000, 818 .rate_max = 48000, 819 .channels_min = 1, 820 .channels_max = 2, 821 .buffer_bytes_max = 256 * 1024, /* FIXME: enough? */ 822 .period_bytes_min = 64, 823 .period_bytes_max = 256 * 1024, /* FIXME: enough? */ 824 .periods_min = 3, 825 .periods_max = 1024, 826 .fifo_size = 0, 827 827 }; 828 828 … … 1053 1053 1054 1054 static snd_pcm_ops_t snd_ymfpci_playback_ops = { 1055 snd_ymfpci_playback_open,1056 snd_ymfpci_playback_close,1057 snd_pcm_lib_ioctl,1058 snd_ymfpci_playback_hw_params,1059 snd_ymfpci_playback_hw_free,1060 snd_ymfpci_playback_prepare,1061 snd_ymfpci_playback_trigger,1062 snd_ymfpci_playback_pointer,0,0,0,0 1055 .open = snd_ymfpci_playback_open, 1056 .close = snd_ymfpci_playback_close, 1057 .ioctl = snd_pcm_lib_ioctl, 1058 .hw_params = snd_ymfpci_playback_hw_params, 1059 .hw_free = snd_ymfpci_playback_hw_free, 1060 .prepare = snd_ymfpci_playback_prepare, 1061 .trigger = snd_ymfpci_playback_trigger, 1062 .pointer = snd_ymfpci_playback_pointer, 1063 1063 }; 1064 1064 1065 1065 static snd_pcm_ops_t snd_ymfpci_capture_rec_ops = { 1066 snd_ymfpci_capture_rec_open,1067 snd_ymfpci_capture_close,1068 snd_pcm_lib_ioctl,1069 snd_ymfpci_capture_hw_params,1070 snd_ymfpci_capture_hw_free,1071 snd_ymfpci_capture_prepare,1072 snd_ymfpci_capture_trigger,1073 snd_ymfpci_capture_pointer,0,0,0,0 1066 .open = snd_ymfpci_capture_rec_open, 1067 .close = snd_ymfpci_capture_close, 1068 .ioctl = snd_pcm_lib_ioctl, 1069 .hw_params = snd_ymfpci_capture_hw_params, 1070 .hw_free = snd_ymfpci_capture_hw_free, 1071 .prepare = snd_ymfpci_capture_prepare, 1072 .trigger = snd_ymfpci_capture_trigger, 1073 .pointer = snd_ymfpci_capture_pointer, 1074 1074 }; 1075 1075 … … 1111 1111 1112 1112 static snd_pcm_ops_t snd_ymfpci_capture_ac97_ops = { 1113 snd_ymfpci_capture_ac97_open,1114 snd_ymfpci_capture_close,1115 snd_pcm_lib_ioctl,1116 snd_ymfpci_capture_hw_params,1117 snd_ymfpci_capture_hw_free,1118 snd_ymfpci_capture_prepare,1119 snd_ymfpci_capture_trigger,1120 snd_ymfpci_capture_pointer,0,0 1113 .open = snd_ymfpci_capture_ac97_open, 1114 .close = snd_ymfpci_capture_close, 1115 .ioctl = snd_pcm_lib_ioctl, 1116 .hw_params = snd_ymfpci_capture_hw_params, 1117 .hw_free = snd_ymfpci_capture_hw_free, 1118 .prepare = snd_ymfpci_capture_prepare, 1119 .trigger = snd_ymfpci_capture_trigger, 1120 .pointer = snd_ymfpci_capture_pointer, 1121 1121 }; 1122 1122 … … 1158 1158 1159 1159 static snd_pcm_ops_t snd_ymfpci_playback_spdif_ops = { 1160 snd_ymfpci_playback_spdif_open,1161 snd_ymfpci_playback_spdif_close,1162 snd_pcm_lib_ioctl,1163 snd_ymfpci_playback_hw_params,1164 snd_ymfpci_playback_hw_free,1165 snd_ymfpci_playback_prepare,1166 snd_ymfpci_playback_trigger,1167 snd_ymfpci_playback_pointer,0,0 1160 .open = snd_ymfpci_playback_spdif_open, 1161 .close = snd_ymfpci_playback_spdif_close, 1162 .ioctl = snd_pcm_lib_ioctl, 1163 .hw_params = snd_ymfpci_playback_hw_params, 1164 .hw_free = snd_ymfpci_playback_hw_free, 1165 .prepare = snd_ymfpci_playback_prepare, 1166 .trigger = snd_ymfpci_playback_trigger, 1167 .pointer = snd_ymfpci_playback_pointer, 1168 1168 }; 1169 1169 … … 1203 1203 1204 1204 static snd_pcm_ops_t snd_ymfpci_playback_4ch_ops = { 1205 snd_ymfpci_playback_4ch_open,1206 snd_ymfpci_playback_4ch_close,1207 snd_pcm_lib_ioctl,1208 snd_ymfpci_playback_hw_params,1209 snd_ymfpci_playback_hw_free,1210 snd_ymfpci_playback_prepare,1211 snd_ymfpci_playback_trigger,1212 snd_ymfpci_playback_pointer,0,0,0,0 1205 .open = snd_ymfpci_playback_4ch_open, 1206 .close = snd_ymfpci_playback_4ch_close, 1207 .ioctl = snd_pcm_lib_ioctl, 1208 .hw_params = snd_ymfpci_playback_hw_params, 1209 .hw_free = snd_ymfpci_playback_hw_free, 1210 .prepare = snd_ymfpci_playback_prepare, 1211 .trigger = snd_ymfpci_playback_trigger, 1212 .pointer = snd_ymfpci_playback_pointer, 1213 1213 }; 1214 1214 … … 1316 1316 { 1317 1317 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1318 .iface = SNDRV_CTL_ELEM_IFACE_PCM,1319 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),1318 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1319 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK), 1320 1320 .info = snd_ymfpci_spdif_mask_info, 1321 1321 .get = snd_ymfpci_spdif_mask_get, … … 1363 1363 { 1364 1364 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 1365 .iface = SNDRV_CTL_ELEM_IFACE_PCM,1366 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),1365 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1366 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), 1367 1367 .info = snd_ymfpci_spdif_stream_info, 1368 1368 .get = snd_ymfpci_spdif_stream_get, … … 1434 1434 .private_value = ((reg) | ((shift) << 16)) } 1435 1435 1436 #if 01437 #define YMFPCI_SINGLE(xname, xindex, reg) \1438 { SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, xindex, \1439 0, 0, snd_ymfpci_info_single, \1440 snd_ymfpci_get_single, snd_ymfpci_put_single, \1441 reg }1442 1443 #endif1444 1436 static int snd_ymfpci_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1445 1437 {  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  