aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-04-07 06:28:00 -0400
committerTakashi Iwai <tiwai@suse.de>2012-04-07 06:28:00 -0400
commitc38f62b08d800104fa9b0e9d6e9141459986c06d (patch)
tree1d04d768c8aa0c1a544d1f068317c7beb0101be2 /sound/pci
parent250f32747e62cb415b85083e247184188f24e566 (diff)
parent8abe05c6eb358967f16bce8a02c88d57c82cfbd6 (diff)
Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: fixes for 3.4 A bunch of driver-specific fixes and one generic fix for the new support for platform DAPM contexts - we were picking the wrong default for the idle_bias_off setting which was meaning we weren't actually achieving any useful runtime PM on platform devices.
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/asihpi/hpios.h1
-rw-r--r--sound/pci/aw2/aw2-saa7146.c1
-rw-r--r--sound/pci/es1968.c15
-rw-r--r--sound/pci/fm801.c20
-rw-r--r--sound/pci/hda/patch_conexant.c2
5 files changed, 34 insertions, 5 deletions
diff --git a/sound/pci/asihpi/hpios.h b/sound/pci/asihpi/hpios.h
index c5cef113c209..d3fbd0d76c37 100644
--- a/sound/pci/asihpi/hpios.h
+++ b/sound/pci/asihpi/hpios.h
@@ -30,7 +30,6 @@ HPI Operating System Specific macros for Linux Kernel driver
30#define HPI_BUILD_KERNEL_MODE 30#define HPI_BUILD_KERNEL_MODE
31 31
32#include <linux/io.h> 32#include <linux/io.h>
33#include <asm/system.h>
34#include <linux/ioctl.h> 33#include <linux/ioctl.h>
35#include <linux/kernel.h> 34#include <linux/kernel.h>
36#include <linux/string.h> 35#include <linux/string.h>
diff --git a/sound/pci/aw2/aw2-saa7146.c b/sound/pci/aw2/aw2-saa7146.c
index 8afd8b5d1ac7..4439636971eb 100644
--- a/sound/pci/aw2/aw2-saa7146.c
+++ b/sound/pci/aw2/aw2-saa7146.c
@@ -27,7 +27,6 @@
27#include <linux/pci.h> 27#include <linux/pci.h>
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/delay.h> 29#include <linux/delay.h>
30#include <asm/system.h>
31#include <asm/io.h> 30#include <asm/io.h>
32#include <sound/core.h> 31#include <sound/core.h>
33#include <sound/initval.h> 32#include <sound/initval.h>
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index cb557c603a80..a8faae1c85e4 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -142,6 +142,7 @@ static int enable_mpu[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
142#ifdef SUPPORT_JOYSTICK 142#ifdef SUPPORT_JOYSTICK
143static bool joystick[SNDRV_CARDS]; 143static bool joystick[SNDRV_CARDS];
144#endif 144#endif
145static int radio_nr[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
145 146
146module_param_array(index, int, NULL, 0444); 147module_param_array(index, int, NULL, 0444);
147MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); 148MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");
@@ -165,6 +166,9 @@ MODULE_PARM_DESC(enable_mpu, "Enable MPU401. (0 = off, 1 = on, 2 = auto)");
165module_param_array(joystick, bool, NULL, 0444); 166module_param_array(joystick, bool, NULL, 0444);
166MODULE_PARM_DESC(joystick, "Enable joystick."); 167MODULE_PARM_DESC(joystick, "Enable joystick.");
167#endif 168#endif
169module_param_array(radio_nr, int, NULL, 0444);
170MODULE_PARM_DESC(radio_nr, "Radio device numbers");
171
168 172
169 173
170#define NR_APUS 64 174#define NR_APUS 64
@@ -558,6 +562,7 @@ struct es1968 {
558 struct work_struct hwvol_work; 562 struct work_struct hwvol_work;
559 563
560#ifdef CONFIG_SND_ES1968_RADIO 564#ifdef CONFIG_SND_ES1968_RADIO
565 struct v4l2_device v4l2_dev;
561 struct snd_tea575x tea; 566 struct snd_tea575x tea;
562#endif 567#endif
563}; 568};
@@ -2613,6 +2618,7 @@ static int snd_es1968_free(struct es1968 *chip)
2613 2618
2614#ifdef CONFIG_SND_ES1968_RADIO 2619#ifdef CONFIG_SND_ES1968_RADIO
2615 snd_tea575x_exit(&chip->tea); 2620 snd_tea575x_exit(&chip->tea);
2621 v4l2_device_unregister(&chip->v4l2_dev);
2616#endif 2622#endif
2617 2623
2618 if (chip->irq >= 0) 2624 if (chip->irq >= 0)
@@ -2655,6 +2661,7 @@ static int __devinit snd_es1968_create(struct snd_card *card,
2655 int capt_streams, 2661 int capt_streams,
2656 int chip_type, 2662 int chip_type,
2657 int do_pm, 2663 int do_pm,
2664 int radio_nr,
2658 struct es1968 **chip_ret) 2665 struct es1968 **chip_ret)
2659{ 2666{
2660 static struct snd_device_ops ops = { 2667 static struct snd_device_ops ops = {
@@ -2751,7 +2758,14 @@ static int __devinit snd_es1968_create(struct snd_card *card,
2751 snd_card_set_dev(card, &pci->dev); 2758 snd_card_set_dev(card, &pci->dev);
2752 2759
2753#ifdef CONFIG_SND_ES1968_RADIO 2760#ifdef CONFIG_SND_ES1968_RADIO
2761 err = v4l2_device_register(&pci->dev, &chip->v4l2_dev);
2762 if (err < 0) {
2763 snd_es1968_free(chip);
2764 return err;
2765 }
2766 chip->tea.v4l2_dev = &chip->v4l2_dev;
2754 chip->tea.private_data = chip; 2767 chip->tea.private_data = chip;
2768 chip->tea.radio_nr = radio_nr;
2755 chip->tea.ops = &snd_es1968_tea_ops; 2769 chip->tea.ops = &snd_es1968_tea_ops;
2756 strlcpy(chip->tea.card, "SF64-PCE2", sizeof(chip->tea.card)); 2770 strlcpy(chip->tea.card, "SF64-PCE2", sizeof(chip->tea.card));
2757 sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); 2771 sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci));
@@ -2797,6 +2811,7 @@ static int __devinit snd_es1968_probe(struct pci_dev *pci,
2797 pcm_substreams_c[dev], 2811 pcm_substreams_c[dev],
2798 pci_id->driver_data, 2812 pci_id->driver_data,
2799 use_pm[dev], 2813 use_pm[dev],
2814 radio_nr[dev],
2800 &chip)) < 0) { 2815 &chip)) < 0) {
2801 snd_card_free(card); 2816 snd_card_free(card);
2802 return err; 2817 return err;
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index 9597ef1eccca..a416ea8af3e9 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -58,6 +58,7 @@ static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card
58 * High 16-bits are video (radio) device number + 1 58 * High 16-bits are video (radio) device number + 1
59 */ 59 */
60static int tea575x_tuner[SNDRV_CARDS]; 60static int tea575x_tuner[SNDRV_CARDS];
61static int radio_nr[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
61 62
62module_param_array(index, int, NULL, 0444); 63module_param_array(index, int, NULL, 0444);
63MODULE_PARM_DESC(index, "Index value for the FM801 soundcard."); 64MODULE_PARM_DESC(index, "Index value for the FM801 soundcard.");
@@ -67,6 +68,9 @@ module_param_array(enable, bool, NULL, 0444);
67MODULE_PARM_DESC(enable, "Enable FM801 soundcard."); 68MODULE_PARM_DESC(enable, "Enable FM801 soundcard.");
68module_param_array(tea575x_tuner, int, NULL, 0444); 69module_param_array(tea575x_tuner, int, NULL, 0444);
69MODULE_PARM_DESC(tea575x_tuner, "TEA575x tuner access method (0 = auto, 1 = SF256-PCS, 2=SF256-PCP, 3=SF64-PCR, 8=disable, +16=tuner-only)."); 70MODULE_PARM_DESC(tea575x_tuner, "TEA575x tuner access method (0 = auto, 1 = SF256-PCS, 2=SF256-PCP, 3=SF64-PCR, 8=disable, +16=tuner-only).");
71module_param_array(radio_nr, int, NULL, 0444);
72MODULE_PARM_DESC(radio_nr, "Radio device numbers");
73
70 74
71#define TUNER_DISABLED (1<<3) 75#define TUNER_DISABLED (1<<3)
72#define TUNER_ONLY (1<<4) 76#define TUNER_ONLY (1<<4)
@@ -197,6 +201,7 @@ struct fm801 {
197 struct snd_info_entry *proc_entry; 201 struct snd_info_entry *proc_entry;
198 202
199#ifdef CONFIG_SND_FM801_TEA575X_BOOL 203#ifdef CONFIG_SND_FM801_TEA575X_BOOL
204 struct v4l2_device v4l2_dev;
200 struct snd_tea575x tea; 205 struct snd_tea575x tea;
201#endif 206#endif
202 207
@@ -1154,8 +1159,10 @@ static int snd_fm801_free(struct fm801 *chip)
1154 1159
1155 __end_hw: 1160 __end_hw:
1156#ifdef CONFIG_SND_FM801_TEA575X_BOOL 1161#ifdef CONFIG_SND_FM801_TEA575X_BOOL
1157 if (!(chip->tea575x_tuner & TUNER_DISABLED)) 1162 if (!(chip->tea575x_tuner & TUNER_DISABLED)) {
1158 snd_tea575x_exit(&chip->tea); 1163 snd_tea575x_exit(&chip->tea);
1164 v4l2_device_unregister(&chip->v4l2_dev);
1165 }
1159#endif 1166#endif
1160 if (chip->irq >= 0) 1167 if (chip->irq >= 0)
1161 free_irq(chip->irq, chip); 1168 free_irq(chip->irq, chip);
@@ -1175,6 +1182,7 @@ static int snd_fm801_dev_free(struct snd_device *device)
1175static int __devinit snd_fm801_create(struct snd_card *card, 1182static int __devinit snd_fm801_create(struct snd_card *card,
1176 struct pci_dev * pci, 1183 struct pci_dev * pci,
1177 int tea575x_tuner, 1184 int tea575x_tuner,
1185 int radio_nr,
1178 struct fm801 ** rchip) 1186 struct fm801 ** rchip)
1179{ 1187{
1180 struct fm801 *chip; 1188 struct fm801 *chip;
@@ -1234,6 +1242,13 @@ static int __devinit snd_fm801_create(struct snd_card *card,
1234 snd_card_set_dev(card, &pci->dev); 1242 snd_card_set_dev(card, &pci->dev);
1235 1243
1236#ifdef CONFIG_SND_FM801_TEA575X_BOOL 1244#ifdef CONFIG_SND_FM801_TEA575X_BOOL
1245 err = v4l2_device_register(&pci->dev, &chip->v4l2_dev);
1246 if (err < 0) {
1247 snd_fm801_free(chip);
1248 return err;
1249 }
1250 chip->tea.v4l2_dev = &chip->v4l2_dev;
1251 chip->tea.radio_nr = radio_nr;
1237 chip->tea.private_data = chip; 1252 chip->tea.private_data = chip;
1238 chip->tea.ops = &snd_fm801_tea_ops; 1253 chip->tea.ops = &snd_fm801_tea_ops;
1239 sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); 1254 sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci));
@@ -1241,6 +1256,7 @@ static int __devinit snd_fm801_create(struct snd_card *card,
1241 (tea575x_tuner & TUNER_TYPE_MASK) < 4) { 1256 (tea575x_tuner & TUNER_TYPE_MASK) < 4) {
1242 if (snd_tea575x_init(&chip->tea)) { 1257 if (snd_tea575x_init(&chip->tea)) {
1243 snd_printk(KERN_ERR "TEA575x radio not found\n"); 1258 snd_printk(KERN_ERR "TEA575x radio not found\n");
1259 snd_fm801_free(chip);
1244 return -ENODEV; 1260 return -ENODEV;
1245 } 1261 }
1246 } else if ((tea575x_tuner & TUNER_TYPE_MASK) == 0) { 1262 } else if ((tea575x_tuner & TUNER_TYPE_MASK) == 0) {
@@ -1287,7 +1303,7 @@ static int __devinit snd_card_fm801_probe(struct pci_dev *pci,
1287 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); 1303 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
1288 if (err < 0) 1304 if (err < 0)
1289 return err; 1305 return err;
1290 if ((err = snd_fm801_create(card, pci, tea575x_tuner[dev], &chip)) < 0) { 1306 if ((err = snd_fm801_create(card, pci, tea575x_tuner[dev], radio_nr[dev], &chip)) < 0) {
1291 snd_card_free(card); 1307 snd_card_free(card);
1292 return err; 1308 return err;
1293 } 1309 }
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 3848711d89f7..a36488d94aaa 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -1607,7 +1607,7 @@ static void cxt5051_update_speaker(struct hda_codec *codec)
1607 pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0; 1607 pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0;
1608 snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 1608 snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
1609 pinctl); 1609 pinctl);
1610 /* on ideapad there is an aditional speaker (subwoofer) to mute */ 1610 /* on ideapad there is an additional speaker (subwoofer) to mute */
1611 if (spec->ideapad) 1611 if (spec->ideapad)
1612 snd_hda_codec_write(codec, 0x1b, 0, 1612 snd_hda_codec_write(codec, 0x1b, 0,
1613 AC_VERB_SET_PIN_WIDGET_CONTROL, 1613 AC_VERB_SET_PIN_WIDGET_CONTROL,