summaryrefslogtreecommitdiffstats
path: root/sound/pci/rme96.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-09-14 14:19:17 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-14 14:34:17 -0700
commit8b7fc4214b550fafe595330e28d7c2c72b8b62f6 (patch)
treeadbe6316875456f889b3e155443d83d2c4ea0e92 /sound/pci/rme96.c
parent0ed8e048c9e11e69ec951f94066105e80cdc59fd (diff)
downloadop-kernel-dev-8b7fc4214b550fafe595330e28d7c2c72b8b62f6.zip
op-kernel-dev-8b7fc4214b550fafe595330e28d7c2c72b8b62f6.tar.gz
[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/rme96.c')
-rw-r--r--sound/pci/rme96.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c
index 9983b66..c495cae 100644
--- a/sound/pci/rme96.c
+++ b/sound/pci/rme96.c
@@ -233,13 +233,13 @@ typedef struct snd_rme96 {
} rme96_t;
static struct pci_device_id snd_rme96_ids[] = {
- { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_DIGI96,
+ { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
- { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_DIGI96_8,
+ { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
- { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_DIGI96_8_PRO,
+ { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8_PRO,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
- { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_DIGI96_8_PAD_OR_PST,
+ { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
{ 0, }
};
@@ -248,12 +248,12 @@ MODULE_DEVICE_TABLE(pci, snd_rme96_ids);
#define RME96_ISPLAYING(rme96) ((rme96)->wcreg & RME96_WCR_START)
#define RME96_ISRECORDING(rme96) ((rme96)->wcreg & RME96_WCR_START_2)
-#define RME96_HAS_ANALOG_IN(rme96) ((rme96)->pci->device == PCI_DEVICE_ID_DIGI96_8_PAD_OR_PST)
-#define RME96_HAS_ANALOG_OUT(rme96) ((rme96)->pci->device == PCI_DEVICE_ID_DIGI96_8_PRO || \
- (rme96)->pci->device == PCI_DEVICE_ID_DIGI96_8_PAD_OR_PST)
+#define RME96_HAS_ANALOG_IN(rme96) ((rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST)
+#define RME96_HAS_ANALOG_OUT(rme96) ((rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PRO || \
+ (rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST)
#define RME96_DAC_IS_1852(rme96) (RME96_HAS_ANALOG_OUT(rme96) && (rme96)->rev >= 4)
-#define RME96_DAC_IS_1855(rme96) (((rme96)->pci->device == PCI_DEVICE_ID_DIGI96_8_PAD_OR_PST && (rme96)->rev < 4) || \
- ((rme96)->pci->device == PCI_DEVICE_ID_DIGI96_8_PRO && (rme96)->rev == 2))
+#define RME96_DAC_IS_1855(rme96) (((rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST && (rme96)->rev < 4) || \
+ ((rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PRO && (rme96)->rev == 2))
#define RME96_185X_MAX_OUT(rme96) ((1 << (RME96_DAC_IS_1852(rme96) ? RME96_AD1852_VOL_BITS : RME96_AD1855_VOL_BITS)) - 1)
static int
@@ -830,9 +830,9 @@ snd_rme96_setinputtype(rme96_t *rme96,
RME96_WCR_INP_1;
break;
case RME96_INPUT_XLR:
- if ((rme96->pci->device != PCI_DEVICE_ID_DIGI96_8_PAD_OR_PST &&
- rme96->pci->device != PCI_DEVICE_ID_DIGI96_8_PRO) ||
- (rme96->pci->device == PCI_DEVICE_ID_DIGI96_8_PAD_OR_PST &&
+ if ((rme96->pci->device != PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST &&
+ rme96->pci->device != PCI_DEVICE_ID_RME_DIGI96_8_PRO) ||
+ (rme96->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST &&
rme96->rev > 4))
{
/* Only Digi96/8 PRO and Digi96/8 PAD supports XLR */
@@ -1598,7 +1598,7 @@ snd_rme96_create(rme96_t *rme96)
rme96->spdif_pcm->info_flags = 0;
/* set up ALSA pcm device for ADAT */
- if (pci->device == PCI_DEVICE_ID_DIGI96) {
+ if (pci->device == PCI_DEVICE_ID_RME_DIGI96) {
/* ADAT is not available on the base model */
rme96->adat_pcm = NULL;
} else {
@@ -1858,14 +1858,14 @@ snd_rme96_info_inputtype_control(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
switch (rme96->pci->device) {
- case PCI_DEVICE_ID_DIGI96:
- case PCI_DEVICE_ID_DIGI96_8:
+ case PCI_DEVICE_ID_RME_DIGI96:
+ case PCI_DEVICE_ID_RME_DIGI96_8:
uinfo->value.enumerated.items = 3;
break;
- case PCI_DEVICE_ID_DIGI96_8_PRO:
+ case PCI_DEVICE_ID_RME_DIGI96_8_PRO:
uinfo->value.enumerated.items = 4;
break;
- case PCI_DEVICE_ID_DIGI96_8_PAD_OR_PST:
+ case PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST:
if (rme96->rev > 4) {
/* PST */
uinfo->value.enumerated.items = 4;
@@ -1895,14 +1895,14 @@ snd_rme96_get_inputtype_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
ucontrol->value.enumerated.item[0] = snd_rme96_getinputtype(rme96);
switch (rme96->pci->device) {
- case PCI_DEVICE_ID_DIGI96:
- case PCI_DEVICE_ID_DIGI96_8:
+ case PCI_DEVICE_ID_RME_DIGI96:
+ case PCI_DEVICE_ID_RME_DIGI96_8:
items = 3;
break;
- case PCI_DEVICE_ID_DIGI96_8_PRO:
+ case PCI_DEVICE_ID_RME_DIGI96_8_PRO:
items = 4;
break;
- case PCI_DEVICE_ID_DIGI96_8_PAD_OR_PST:
+ case PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST:
if (rme96->rev > 4) {
/* for handling PST case, (INPUT_ANALOG is moved to INPUT_XLR */
if (ucontrol->value.enumerated.item[0] == RME96_INPUT_ANALOG) {
@@ -1932,14 +1932,14 @@ snd_rme96_put_inputtype_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
int change, items = 3;
switch (rme96->pci->device) {
- case PCI_DEVICE_ID_DIGI96:
- case PCI_DEVICE_ID_DIGI96_8:
+ case PCI_DEVICE_ID_RME_DIGI96:
+ case PCI_DEVICE_ID_RME_DIGI96_8:
items = 3;
break;
- case PCI_DEVICE_ID_DIGI96_8_PRO:
+ case PCI_DEVICE_ID_RME_DIGI96_8_PRO:
items = 4;
break;
- case PCI_DEVICE_ID_DIGI96_8_PAD_OR_PST:
+ case PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST:
if (rme96->rev > 4) {
items = 4;
} else {
@@ -1953,7 +1953,7 @@ snd_rme96_put_inputtype_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
val = ucontrol->value.enumerated.item[0] % items;
/* special case for PST */
- if (rme96->pci->device == PCI_DEVICE_ID_DIGI96_8_PAD_OR_PST && rme96->rev > 4) {
+ if (rme96->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST && rme96->rev > 4) {
if (val == RME96_INPUT_XLR) {
val = RME96_INPUT_ANALOG;
}
@@ -2375,16 +2375,16 @@ snd_rme96_probe(struct pci_dev *pci,
strcpy(card->driver, "Digi96");
switch (rme96->pci->device) {
- case PCI_DEVICE_ID_DIGI96:
+ case PCI_DEVICE_ID_RME_DIGI96:
strcpy(card->shortname, "RME Digi96");
break;
- case PCI_DEVICE_ID_DIGI96_8:
+ case PCI_DEVICE_ID_RME_DIGI96_8:
strcpy(card->shortname, "RME Digi96/8");
break;
- case PCI_DEVICE_ID_DIGI96_8_PRO:
+ case PCI_DEVICE_ID_RME_DIGI96_8_PRO:
strcpy(card->shortname, "RME Digi96/8 PRO");
break;
- case PCI_DEVICE_ID_DIGI96_8_PAD_OR_PST:
+ case PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST:
pci_read_config_byte(rme96->pci, 8, &val);
if (val < 5) {
strcpy(card->shortname, "RME Digi96/8 PAD");
OpenPOWER on IntegriCloud