aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/rme32.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-09-14 17:19:17 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-14 17:34:17 -0400
commit8b7fc4214b550fafe595330e28d7c2c72b8b62f6 (patch)
treeadbe6316875456f889b3e155443d83d2c4ea0e92 /sound/pci/rme32.c
parent0ed8e048c9e11e69ec951f94066105e80cdc59fd (diff)
[PATCH] add PCI IDs so RME32 and RME96 drivers build
While doing an allyesconfig build, I noticed that the commit commit 8cdfd2519c6c9a1e6057dc5970b2542b35895738 Author: Takashi Iwai <tiwai@suse.de> Date: Wed Sep 7 14:08:11 2005 +0200 [ALSA] Remove superfluous PCI ID definitions broke the RME32 and RME96 drivers, since the PCI IDs they use seem to have changed names. Here's a patch to fix this -- compile tested only, since I have no idea what the hardware even is. Fix the build of the RME32 and RME96 drivers by having them use the PCI_DEVICE_ID_RME_xxx names defined in <linux/pci_ids.h> instead of the PCI_DEVICE_ID_xxx names that they used to define themselves. Also fix the typo in the id PCI_DEVICE_IDRME__DIGI96_8_PAD_OR_PST so the name is PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST. Signed-off-by: Roland Dreier <rolandd@cisco.com> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/pci/rme32.c')
-rw-r--r--sound/pci/rme32.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c
index 3daeecb9eb0e..cd313af6ebcf 100644
--- a/sound/pci/rme32.c
+++ b/sound/pci/rme32.c
@@ -228,11 +228,11 @@ typedef struct snd_rme32 {
228} rme32_t; 228} rme32_t;
229 229
230static struct pci_device_id snd_rme32_ids[] = { 230static struct pci_device_id snd_rme32_ids[] = {
231 {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_DIGI32, 231 {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32,
232 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, 232 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},
233 {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_DIGI32_8, 233 {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_8,
234 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, 234 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},
235 {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_DIGI32_PRO, 235 {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_PRO,
236 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, 236 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},
237 {0,} 237 {0,}
238}; 238};
@@ -240,7 +240,7 @@ static struct pci_device_id snd_rme32_ids[] = {
240MODULE_DEVICE_TABLE(pci, snd_rme32_ids); 240MODULE_DEVICE_TABLE(pci, snd_rme32_ids);
241 241
242#define RME32_ISWORKING(rme32) ((rme32)->wcreg & RME32_WCR_START) 242#define RME32_ISWORKING(rme32) ((rme32)->wcreg & RME32_WCR_START)
243#define RME32_PRO_WITH_8414(rme32) ((rme32)->pci->device == PCI_DEVICE_ID_DIGI32_PRO && (rme32)->rev == RME32_PRO_REVISION_WITH_8414) 243#define RME32_PRO_WITH_8414(rme32) ((rme32)->pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO && (rme32)->rev == RME32_PRO_REVISION_WITH_8414)
244 244
245static int snd_rme32_playback_prepare(snd_pcm_substream_t * substream); 245static int snd_rme32_playback_prepare(snd_pcm_substream_t * substream);
246 246
@@ -527,21 +527,21 @@ static int snd_rme32_playback_setrate(rme32_t * rme32, int rate)
527 RME32_WCR_FREQ_1; 527 RME32_WCR_FREQ_1;
528 break; 528 break;
529 case 64000: 529 case 64000:
530 if (rme32->pci->device != PCI_DEVICE_ID_DIGI32_PRO) 530 if (rme32->pci->device != PCI_DEVICE_ID_RME_DIGI32_PRO)
531 return -EINVAL; 531 return -EINVAL;
532 rme32->wcreg |= RME32_WCR_DS_BM; 532 rme32->wcreg |= RME32_WCR_DS_BM;
533 rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_0) & 533 rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_0) &
534 ~RME32_WCR_FREQ_1; 534 ~RME32_WCR_FREQ_1;
535 break; 535 break;
536 case 88200: 536 case 88200:
537 if (rme32->pci->device != PCI_DEVICE_ID_DIGI32_PRO) 537 if (rme32->pci->device != PCI_DEVICE_ID_RME_DIGI32_PRO)
538 return -EINVAL; 538 return -EINVAL;
539 rme32->wcreg |= RME32_WCR_DS_BM; 539 rme32->wcreg |= RME32_WCR_DS_BM;
540 rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_1) & 540 rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_1) &
541 ~RME32_WCR_FREQ_0; 541 ~RME32_WCR_FREQ_0;
542 break; 542 break;
543 case 96000: 543 case 96000:
544 if (rme32->pci->device != PCI_DEVICE_ID_DIGI32_PRO) 544 if (rme32->pci->device != PCI_DEVICE_ID_RME_DIGI32_PRO)
545 return -EINVAL; 545 return -EINVAL;
546 rme32->wcreg |= RME32_WCR_DS_BM; 546 rme32->wcreg |= RME32_WCR_DS_BM;
547 rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_0) | 547 rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_0) |
@@ -881,7 +881,7 @@ static int snd_rme32_playback_spdif_open(snd_pcm_substream_t * substream)
881 runtime->hw = snd_rme32_spdif_fd_info; 881 runtime->hw = snd_rme32_spdif_fd_info;
882 else 882 else
883 runtime->hw = snd_rme32_spdif_info; 883 runtime->hw = snd_rme32_spdif_info;
884 if (rme32->pci->device == PCI_DEVICE_ID_DIGI32_PRO) { 884 if (rme32->pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO) {
885 runtime->hw.rates |= SNDRV_PCM_RATE_64000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000; 885 runtime->hw.rates |= SNDRV_PCM_RATE_64000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000;
886 runtime->hw.rate_max = 96000; 886 runtime->hw.rate_max = 96000;
887 } 887 }
@@ -1408,8 +1408,8 @@ static int __devinit snd_rme32_create(rme32_t * rme32)
1408 } 1408 }
1409 1409
1410 /* set up ALSA pcm device for ADAT */ 1410 /* set up ALSA pcm device for ADAT */
1411 if ((pci->device == PCI_DEVICE_ID_DIGI32) || 1411 if ((pci->device == PCI_DEVICE_ID_RME_DIGI32) ||
1412 (pci->device == PCI_DEVICE_ID_DIGI32_PRO)) { 1412 (pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO)) {
1413 /* ADAT is not available on DIGI32 and DIGI32 Pro */ 1413 /* ADAT is not available on DIGI32 and DIGI32 Pro */
1414 rme32->adat_pcm = NULL; 1414 rme32->adat_pcm = NULL;
1415 } 1415 }
@@ -1639,11 +1639,11 @@ snd_rme32_info_inputtype_control(snd_kcontrol_t * kcontrol,
1639 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 1639 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
1640 uinfo->count = 1; 1640 uinfo->count = 1;
1641 switch (rme32->pci->device) { 1641 switch (rme32->pci->device) {
1642 case PCI_DEVICE_ID_DIGI32: 1642 case PCI_DEVICE_ID_RME_DIGI32:
1643 case PCI_DEVICE_ID_DIGI32_8: 1643 case PCI_DEVICE_ID_RME_DIGI32_8:
1644 uinfo->value.enumerated.items = 3; 1644 uinfo->value.enumerated.items = 3;
1645 break; 1645 break;
1646 case PCI_DEVICE_ID_DIGI32_PRO: 1646 case PCI_DEVICE_ID_RME_DIGI32_PRO:
1647 uinfo->value.enumerated.items = 4; 1647 uinfo->value.enumerated.items = 4;
1648 break; 1648 break;
1649 default: 1649 default:
@@ -1670,11 +1670,11 @@ snd_rme32_get_inputtype_control(snd_kcontrol_t * kcontrol,
1670 ucontrol->value.enumerated.item[0] = snd_rme32_getinputtype(rme32); 1670 ucontrol->value.enumerated.item[0] = snd_rme32_getinputtype(rme32);
1671 1671
1672 switch (rme32->pci->device) { 1672 switch (rme32->pci->device) {
1673 case PCI_DEVICE_ID_DIGI32: 1673 case PCI_DEVICE_ID_RME_DIGI32:
1674 case PCI_DEVICE_ID_DIGI32_8: 1674 case PCI_DEVICE_ID_RME_DIGI32_8:
1675 items = 3; 1675 items = 3;
1676 break; 1676 break;
1677 case PCI_DEVICE_ID_DIGI32_PRO: 1677 case PCI_DEVICE_ID_RME_DIGI32_PRO:
1678 items = 4; 1678 items = 4;
1679 break; 1679 break;
1680 default: 1680 default:
@@ -1697,11 +1697,11 @@ snd_rme32_put_inputtype_control(snd_kcontrol_t * kcontrol,
1697 int change, items = 3; 1697 int change, items = 3;
1698 1698
1699 switch (rme32->pci->device) { 1699 switch (rme32->pci->device) {
1700 case PCI_DEVICE_ID_DIGI32: 1700 case PCI_DEVICE_ID_RME_DIGI32:
1701 case PCI_DEVICE_ID_DIGI32_8: 1701 case PCI_DEVICE_ID_RME_DIGI32_8:
1702 items = 3; 1702 items = 3;
1703 break; 1703 break;
1704 case PCI_DEVICE_ID_DIGI32_PRO: 1704 case PCI_DEVICE_ID_RME_DIGI32_PRO:
1705 items = 4; 1705 items = 4;
1706 break; 1706 break;
1707 default: 1707 default:
@@ -1982,13 +1982,13 @@ snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
1982 1982
1983 strcpy(card->driver, "Digi32"); 1983 strcpy(card->driver, "Digi32");
1984 switch (rme32->pci->device) { 1984 switch (rme32->pci->device) {
1985 case PCI_DEVICE_ID_DIGI32: 1985 case PCI_DEVICE_ID_RME_DIGI32:
1986 strcpy(card->shortname, "RME Digi32"); 1986 strcpy(card->shortname, "RME Digi32");
1987 break; 1987 break;
1988 case PCI_DEVICE_ID_DIGI32_8: 1988 case PCI_DEVICE_ID_RME_DIGI32_8:
1989 strcpy(card->shortname, "RME Digi32/8"); 1989 strcpy(card->shortname, "RME Digi32/8");
1990 break; 1990 break;
1991 case PCI_DEVICE_ID_DIGI32_PRO: 1991 case PCI_DEVICE_ID_RME_DIGI32_PRO:
1992 strcpy(card->shortname, "RME Digi32 PRO"); 1992 strcpy(card->shortname, "RME Digi32 PRO");
1993 break; 1993 break;
1994 } 1994 }