diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2011-05-12 16:18:22 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-05-13 13:43:24 -0400 |
commit | 10ca72014741554ad37c149ff0d9e93c1e3d5b7d (patch) | |
tree | 697fc1987e7ac705dbb1fbfc1211e9e3e988d576 | |
parent | 3d11ba5593b801b1db85e9680d585713e6039112 (diff) |
ALSA: tea575x: use better card and bus names
Provide real card and bus_info instead of hardcoded values.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | include/sound/tea575x-tuner.h | 2 | ||||
-rw-r--r-- | sound/i2c/other/tea575x-tuner.c | 5 | ||||
-rw-r--r-- | sound/pci/es1968.c | 2 | ||||
-rw-r--r-- | sound/pci/fm801.c | 2 |
4 files changed, 9 insertions, 2 deletions
diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h index 42ce8cd7616f..d2ea112fc20f 100644 --- a/include/sound/tea575x-tuner.h +++ b/include/sound/tea575x-tuner.h | |||
@@ -52,6 +52,8 @@ struct snd_tea575x { | |||
52 | unsigned long in_use; /* set if the device is in use */ | 52 | unsigned long in_use; /* set if the device is in use */ |
53 | struct snd_tea575x_ops *ops; | 53 | struct snd_tea575x_ops *ops; |
54 | void *private_data; | 54 | void *private_data; |
55 | u8 card[32]; | ||
56 | u8 bus_info[32]; | ||
55 | }; | 57 | }; |
56 | 58 | ||
57 | int snd_tea575x_init(struct snd_tea575x *tea); | 59 | int snd_tea575x_init(struct snd_tea575x *tea); |
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index 98ccec27e7bf..4831800239d3 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c | |||
@@ -178,8 +178,9 @@ static int vidioc_querycap(struct file *file, void *priv, | |||
178 | struct snd_tea575x *tea = video_drvdata(file); | 178 | struct snd_tea575x *tea = video_drvdata(file); |
179 | 179 | ||
180 | strlcpy(v->driver, "tea575x-tuner", sizeof(v->driver)); | 180 | strlcpy(v->driver, "tea575x-tuner", sizeof(v->driver)); |
181 | strlcpy(v->card, tea->tea5759 ? "TEA5759" : "TEA5757", sizeof(v->card)); | 181 | strlcpy(v->card, tea->card, sizeof(v->card)); |
182 | sprintf(v->bus_info, "PCI"); | 182 | strlcat(v->card, tea->tea5759 ? " TEA5759" : " TEA5757", sizeof(v->card)); |
183 | strlcpy(v->bus_info, tea->bus_info, sizeof(v->bus_info)); | ||
183 | v->version = RADIO_VERSION; | 184 | v->version = RADIO_VERSION; |
184 | v->capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO; | 185 | v->capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO; |
185 | return 0; | 186 | return 0; |
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index ec7f8371a812..ab0a6156a704 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c | |||
@@ -2795,6 +2795,8 @@ static int __devinit snd_es1968_create(struct snd_card *card, | |||
2795 | #ifdef CONFIG_SND_ES1968_RADIO | 2795 | #ifdef CONFIG_SND_ES1968_RADIO |
2796 | chip->tea.private_data = chip; | 2796 | chip->tea.private_data = chip; |
2797 | chip->tea.ops = &snd_es1968_tea_ops; | 2797 | chip->tea.ops = &snd_es1968_tea_ops; |
2798 | strlcpy(chip->tea.card, "SF64-PCE2", sizeof(chip->tea.card)); | ||
2799 | sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); | ||
2798 | if (!snd_tea575x_init(&chip->tea)) | 2800 | if (!snd_tea575x_init(&chip->tea)) |
2799 | printk(KERN_INFO "es1968: detected TEA575x radio\n"); | 2801 | printk(KERN_INFO "es1968: detected TEA575x radio\n"); |
2800 | #endif | 2802 | #endif |
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index ae5c270bfa7d..05553da2f6cf 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -1232,6 +1232,7 @@ static int __devinit snd_fm801_create(struct snd_card *card, | |||
1232 | #ifdef TEA575X_RADIO | 1232 | #ifdef TEA575X_RADIO |
1233 | chip->tea.private_data = chip; | 1233 | chip->tea.private_data = chip; |
1234 | chip->tea.ops = &snd_fm801_tea_ops; | 1234 | chip->tea.ops = &snd_fm801_tea_ops; |
1235 | sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); | ||
1235 | if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 && | 1236 | if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 && |
1236 | (tea575x_tuner & TUNER_TYPE_MASK) < 4) { | 1237 | (tea575x_tuner & TUNER_TYPE_MASK) < 4) { |
1237 | if (snd_tea575x_init(&chip->tea)) | 1238 | if (snd_tea575x_init(&chip->tea)) |
@@ -1246,6 +1247,7 @@ static int __devinit snd_fm801_create(struct snd_card *card, | |||
1246 | break; | 1247 | break; |
1247 | } | 1248 | } |
1248 | } | 1249 | } |
1250 | strlcpy(chip->tea.card, snd_fm801_tea575x_gpios[(tea575x_tuner & TUNER_TYPE_MASK) - 1].name, sizeof(chip->tea.card)); | ||
1249 | #endif | 1251 | #endif |
1250 | 1252 | ||
1251 | *rchip = chip; | 1253 | *rchip = chip; |