Skip to content

Commit 0d6925d

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: usb - turn off de-emphasis in s/pdif for cm6206 ALSA: asihpi: Use angle brackets for system includes ALSA: fm801: add error handling if auto-detect fails ALSA: hda - Check pin support EAPD in ad198x_power_eapd_write ALSA: hda - Fix HP and Front pins of ad1988/ad1989 in ad198x_power_eapd() ALSA: 6fire: Don't leak firmware in error path ASoC: Fix wm_hubs input PGA ZC bits ASoC: Fix dapm_is_shared_kcontrol so everything isn't shared
2 parents c12f667 + 3190dad commit 0d6925d

File tree

7 files changed

+30
-17
lines changed

7 files changed

+30
-17
lines changed

sound/pci/asihpi/hpidspcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct code_header {
6060
HPI_VER_MINOR(HPI_VER) * 100 + HPI_VER_RELEASE(HPI_VER)))
6161

6262
/***********************************************************************/
63-
#include "linux/pci.h"
63+
#include <linux/pci.h>
6464
/*-------------------------------------------------------------------*/
6565
short hpi_dsp_code_open(u32 adapter, struct dsp_code *ps_dsp_code,
6666
u32 *pos_error_code)

sound/pci/fm801.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,9 +1234,12 @@ static int __devinit snd_fm801_create(struct snd_card *card,
12341234
sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci));
12351235
if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 &&
12361236
(tea575x_tuner & TUNER_TYPE_MASK) < 4) {
1237-
if (snd_tea575x_init(&chip->tea))
1237+
if (snd_tea575x_init(&chip->tea)) {
12381238
snd_printk(KERN_ERR "TEA575x radio not found\n");
1239-
} else if ((tea575x_tuner & TUNER_TYPE_MASK) == 0)
1239+
snd_fm801_free(chip);
1240+
return -ENODEV;
1241+
}
1242+
} else if ((tea575x_tuner & TUNER_TYPE_MASK) == 0) {
12401243
/* autodetect tuner connection */
12411244
for (tea575x_tuner = 1; tea575x_tuner <= 3; tea575x_tuner++) {
12421245
chip->tea575x_tuner = tea575x_tuner;
@@ -1246,6 +1249,12 @@ static int __devinit snd_fm801_create(struct snd_card *card,
12461249
break;
12471250
}
12481251
}
1252+
if (tea575x_tuner == 4) {
1253+
snd_printk(KERN_ERR "TEA575x radio not found\n");
1254+
snd_fm801_free(chip);
1255+
return -ENODEV;
1256+
}
1257+
}
12491258
strlcpy(chip->tea.card, snd_fm801_tea575x_gpios[(tea575x_tuner & TUNER_TYPE_MASK) - 1].name, sizeof(chip->tea.card));
12501259
#endif
12511260

sound/pci/hda/patch_analog.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -506,9 +506,11 @@ static void ad198x_power_eapd_write(struct hda_codec *codec, hda_nid_t front,
506506
hda_nid_t hp)
507507
{
508508
struct ad198x_spec *spec = codec->spec;
509-
snd_hda_codec_write(codec, front, 0, AC_VERB_SET_EAPD_BTLENABLE,
509+
if (snd_hda_query_pin_caps(codec, front) & AC_PINCAP_EAPD)
510+
snd_hda_codec_write(codec, front, 0, AC_VERB_SET_EAPD_BTLENABLE,
510511
!spec->inv_eapd ? 0x00 : 0x02);
511-
snd_hda_codec_write(codec, hp, 0, AC_VERB_SET_EAPD_BTLENABLE,
512+
if (snd_hda_query_pin_caps(codec, hp) & AC_PINCAP_EAPD)
513+
snd_hda_codec_write(codec, hp, 0, AC_VERB_SET_EAPD_BTLENABLE,
512514
!spec->inv_eapd ? 0x00 : 0x02);
513515
}
514516

@@ -524,6 +526,10 @@ static void ad198x_power_eapd(struct hda_codec *codec)
524526
case 0x11d4184a:
525527
case 0x11d4194a:
526528
case 0x11d4194b:
529+
case 0x11d41988:
530+
case 0x11d4198b:
531+
case 0x11d4989a:
532+
case 0x11d4989b:
527533
ad198x_power_eapd_write(codec, 0x12, 0x11);
528534
break;
529535
case 0x11d41981:
@@ -533,12 +539,6 @@ static void ad198x_power_eapd(struct hda_codec *codec)
533539
case 0x11d41986:
534540
ad198x_power_eapd_write(codec, 0x1b, 0x1a);
535541
break;
536-
case 0x11d41988:
537-
case 0x11d4198b:
538-
case 0x11d4989a:
539-
case 0x11d4989b:
540-
ad198x_power_eapd_write(codec, 0x29, 0x22);
541-
break;
542542
}
543543
}
544544

sound/soc/codecs/wm_hubs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,23 +215,23 @@ static const struct snd_kcontrol_new analogue_snd_controls[] = {
215215
SOC_SINGLE_TLV("IN1L Volume", WM8993_LEFT_LINE_INPUT_1_2_VOLUME, 0, 31, 0,
216216
inpga_tlv),
217217
SOC_SINGLE("IN1L Switch", WM8993_LEFT_LINE_INPUT_1_2_VOLUME, 7, 1, 1),
218-
SOC_SINGLE("IN1L ZC Switch", WM8993_LEFT_LINE_INPUT_1_2_VOLUME, 7, 1, 0),
218+
SOC_SINGLE("IN1L ZC Switch", WM8993_LEFT_LINE_INPUT_1_2_VOLUME, 6, 1, 0),
219219

220220
SOC_SINGLE_TLV("IN1R Volume", WM8993_RIGHT_LINE_INPUT_1_2_VOLUME, 0, 31, 0,
221221
inpga_tlv),
222222
SOC_SINGLE("IN1R Switch", WM8993_RIGHT_LINE_INPUT_1_2_VOLUME, 7, 1, 1),
223-
SOC_SINGLE("IN1R ZC Switch", WM8993_RIGHT_LINE_INPUT_1_2_VOLUME, 7, 1, 0),
223+
SOC_SINGLE("IN1R ZC Switch", WM8993_RIGHT_LINE_INPUT_1_2_VOLUME, 6, 1, 0),
224224

225225

226226
SOC_SINGLE_TLV("IN2L Volume", WM8993_LEFT_LINE_INPUT_3_4_VOLUME, 0, 31, 0,
227227
inpga_tlv),
228228
SOC_SINGLE("IN2L Switch", WM8993_LEFT_LINE_INPUT_3_4_VOLUME, 7, 1, 1),
229-
SOC_SINGLE("IN2L ZC Switch", WM8993_LEFT_LINE_INPUT_3_4_VOLUME, 7, 1, 0),
229+
SOC_SINGLE("IN2L ZC Switch", WM8993_LEFT_LINE_INPUT_3_4_VOLUME, 6, 1, 0),
230230

231231
SOC_SINGLE_TLV("IN2R Volume", WM8993_RIGHT_LINE_INPUT_3_4_VOLUME, 0, 31, 0,
232232
inpga_tlv),
233233
SOC_SINGLE("IN2R Switch", WM8993_RIGHT_LINE_INPUT_3_4_VOLUME, 7, 1, 1),
234-
SOC_SINGLE("IN2R ZC Switch", WM8993_RIGHT_LINE_INPUT_3_4_VOLUME, 7, 1, 0),
234+
SOC_SINGLE("IN2R ZC Switch", WM8993_RIGHT_LINE_INPUT_3_4_VOLUME, 6, 1, 0),
235235

236236
SOC_SINGLE_TLV("MIXINL IN2L Volume", WM8993_INPUT_MIXER3, 7, 1, 0,
237237
inmix_sw_tlv),

sound/soc/soc-dapm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ static int dapm_connect_mixer(struct snd_soc_dapm_context *dapm,
325325
}
326326

327327
static int dapm_is_shared_kcontrol(struct snd_soc_dapm_context *dapm,
328+
struct snd_soc_dapm_widget *kcontrolw,
328329
const struct snd_kcontrol_new *kcontrol_new,
329330
struct snd_kcontrol **kcontrol)
330331
{
@@ -334,6 +335,8 @@ static int dapm_is_shared_kcontrol(struct snd_soc_dapm_context *dapm,
334335
*kcontrol = NULL;
335336

336337
list_for_each_entry(w, &dapm->card->widgets, list) {
338+
if (w == kcontrolw || w->dapm != kcontrolw->dapm)
339+
continue;
337340
for (i = 0; i < w->num_kcontrols; i++) {
338341
if (&w->kcontrol_news[i] == kcontrol_new) {
339342
if (w->kcontrols)
@@ -468,7 +471,7 @@ static int dapm_new_mux(struct snd_soc_dapm_context *dapm,
468471
return -EINVAL;
469472
}
470473

471-
shared = dapm_is_shared_kcontrol(dapm, &w->kcontrol_news[0],
474+
shared = dapm_is_shared_kcontrol(dapm, w, &w->kcontrol_news[0],
472475
&kcontrol);
473476
if (kcontrol) {
474477
wlist = kcontrol->private_data;

sound/usb/6fire/firmware.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ static int usb6fire_fw_ezusb_upload(
227227
ret = usb6fire_fw_ihex_init(fw, rec);
228228
if (ret < 0) {
229229
kfree(rec);
230+
release_firmware(fw);
230231
snd_printk(KERN_ERR PREFIX "error validating ezusb "
231232
"firmware %s.\n", fwname);
232233
return ret;

sound/usb/quirks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ static int snd_usb_cm106_boot_quirk(struct usb_device *dev)
403403
static int snd_usb_cm6206_boot_quirk(struct usb_device *dev)
404404
{
405405
int err, reg;
406-
int val[] = {0x200c, 0x3000, 0xf800, 0x143f, 0x0000, 0x3000};
406+
int val[] = {0x2004, 0x3000, 0xf800, 0x143f, 0x0000, 0x3000};
407407

408408
for (reg = 0; reg < ARRAY_SIZE(val); reg++) {
409409
err = snd_usb_cm106_write_int_reg(dev, reg, val[reg]);

0 commit comments

Comments
 (0)