diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-06 04:51:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-06 04:51:28 -0400 |
commit | 0d6925d43bd637fe4da7acb7bf1d0b92d38ab34b (patch) | |
tree | 54519330c5eead47d14c654d46e179c6a3e0542c /sound | |
parent | c12f667e7563c2c0e0908c997900b91b41b23592 (diff) | |
parent | 3190dad97b5105ec9b9720f6d7bea54ee830fc2d (diff) |
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
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/asihpi/hpidspcd.c | 2 | ||||
-rw-r--r-- | sound/pci/fm801.c | 13 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 16 | ||||
-rw-r--r-- | sound/soc/codecs/wm_hubs.c | 8 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 5 | ||||
-rw-r--r-- | sound/usb/6fire/firmware.c | 1 | ||||
-rw-r--r-- | sound/usb/quirks.c | 2 |
7 files changed, 30 insertions, 17 deletions
diff --git a/sound/pci/asihpi/hpidspcd.c b/sound/pci/asihpi/hpidspcd.c index fb311d8c05bf..5c6ea113d219 100644 --- a/sound/pci/asihpi/hpidspcd.c +++ b/sound/pci/asihpi/hpidspcd.c | |||
@@ -60,7 +60,7 @@ struct code_header { | |||
60 | HPI_VER_MINOR(HPI_VER) * 100 + HPI_VER_RELEASE(HPI_VER))) | 60 | HPI_VER_MINOR(HPI_VER) * 100 + HPI_VER_RELEASE(HPI_VER))) |
61 | 61 | ||
62 | /***********************************************************************/ | 62 | /***********************************************************************/ |
63 | #include "linux/pci.h" | 63 | #include <linux/pci.h> |
64 | /*-------------------------------------------------------------------*/ | 64 | /*-------------------------------------------------------------------*/ |
65 | short hpi_dsp_code_open(u32 adapter, struct dsp_code *ps_dsp_code, | 65 | short hpi_dsp_code_open(u32 adapter, struct dsp_code *ps_dsp_code, |
66 | u32 *pos_error_code) | 66 | u32 *pos_error_code) |
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index eacd4901a308..a7ec7030cf87 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -1234,9 +1234,12 @@ static int __devinit snd_fm801_create(struct snd_card *card, | |||
1234 | sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); | 1234 | sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); |
1235 | if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 && | 1235 | if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 && |
1236 | (tea575x_tuner & TUNER_TYPE_MASK) < 4) { | 1236 | (tea575x_tuner & TUNER_TYPE_MASK) < 4) { |
1237 | if (snd_tea575x_init(&chip->tea)) | 1237 | if (snd_tea575x_init(&chip->tea)) { |
1238 | snd_printk(KERN_ERR "TEA575x radio not found\n"); | 1238 | 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) { | ||
1240 | /* autodetect tuner connection */ | 1243 | /* autodetect tuner connection */ |
1241 | for (tea575x_tuner = 1; tea575x_tuner <= 3; tea575x_tuner++) { | 1244 | for (tea575x_tuner = 1; tea575x_tuner <= 3; tea575x_tuner++) { |
1242 | chip->tea575x_tuner = tea575x_tuner; | 1245 | chip->tea575x_tuner = tea575x_tuner; |
@@ -1246,6 +1249,12 @@ static int __devinit snd_fm801_create(struct snd_card *card, | |||
1246 | break; | 1249 | break; |
1247 | } | 1250 | } |
1248 | } | 1251 | } |
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 | } | ||
1249 | strlcpy(chip->tea.card, snd_fm801_tea575x_gpios[(tea575x_tuner & TUNER_TYPE_MASK) - 1].name, sizeof(chip->tea.card)); | 1258 | strlcpy(chip->tea.card, snd_fm801_tea575x_gpios[(tea575x_tuner & TUNER_TYPE_MASK) - 1].name, sizeof(chip->tea.card)); |
1250 | #endif | 1259 | #endif |
1251 | 1260 | ||
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 696ac2590307..d694e9d4921d 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -506,9 +506,11 @@ static void ad198x_power_eapd_write(struct hda_codec *codec, hda_nid_t front, | |||
506 | hda_nid_t hp) | 506 | hda_nid_t hp) |
507 | { | 507 | { |
508 | struct ad198x_spec *spec = codec->spec; | 508 | 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, | ||
510 | !spec->inv_eapd ? 0x00 : 0x02); | 511 | !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, | ||
512 | !spec->inv_eapd ? 0x00 : 0x02); | 514 | !spec->inv_eapd ? 0x00 : 0x02); |
513 | } | 515 | } |
514 | 516 | ||
@@ -524,6 +526,10 @@ static void ad198x_power_eapd(struct hda_codec *codec) | |||
524 | case 0x11d4184a: | 526 | case 0x11d4184a: |
525 | case 0x11d4194a: | 527 | case 0x11d4194a: |
526 | case 0x11d4194b: | 528 | case 0x11d4194b: |
529 | case 0x11d41988: | ||
530 | case 0x11d4198b: | ||
531 | case 0x11d4989a: | ||
532 | case 0x11d4989b: | ||
527 | ad198x_power_eapd_write(codec, 0x12, 0x11); | 533 | ad198x_power_eapd_write(codec, 0x12, 0x11); |
528 | break; | 534 | break; |
529 | case 0x11d41981: | 535 | case 0x11d41981: |
@@ -533,12 +539,6 @@ static void ad198x_power_eapd(struct hda_codec *codec) | |||
533 | case 0x11d41986: | 539 | case 0x11d41986: |
534 | ad198x_power_eapd_write(codec, 0x1b, 0x1a); | 540 | ad198x_power_eapd_write(codec, 0x1b, 0x1a); |
535 | break; | 541 | break; |
536 | case 0x11d41988: | ||
537 | case 0x11d4198b: | ||
538 | case 0x11d4989a: | ||
539 | case 0x11d4989b: | ||
540 | ad198x_power_eapd_write(codec, 0x29, 0x22); | ||
541 | break; | ||
542 | } | 542 | } |
543 | } | 543 | } |
544 | 544 | ||
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index e55b298c14a0..9e370d14ad88 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c | |||
@@ -215,23 +215,23 @@ static const struct snd_kcontrol_new analogue_snd_controls[] = { | |||
215 | SOC_SINGLE_TLV("IN1L Volume", WM8993_LEFT_LINE_INPUT_1_2_VOLUME, 0, 31, 0, | 215 | SOC_SINGLE_TLV("IN1L Volume", WM8993_LEFT_LINE_INPUT_1_2_VOLUME, 0, 31, 0, |
216 | inpga_tlv), | 216 | inpga_tlv), |
217 | SOC_SINGLE("IN1L Switch", WM8993_LEFT_LINE_INPUT_1_2_VOLUME, 7, 1, 1), | 217 | 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), |
219 | 219 | ||
220 | SOC_SINGLE_TLV("IN1R Volume", WM8993_RIGHT_LINE_INPUT_1_2_VOLUME, 0, 31, 0, | 220 | SOC_SINGLE_TLV("IN1R Volume", WM8993_RIGHT_LINE_INPUT_1_2_VOLUME, 0, 31, 0, |
221 | inpga_tlv), | 221 | inpga_tlv), |
222 | SOC_SINGLE("IN1R Switch", WM8993_RIGHT_LINE_INPUT_1_2_VOLUME, 7, 1, 1), | 222 | 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), |
224 | 224 | ||
225 | 225 | ||
226 | SOC_SINGLE_TLV("IN2L Volume", WM8993_LEFT_LINE_INPUT_3_4_VOLUME, 0, 31, 0, | 226 | SOC_SINGLE_TLV("IN2L Volume", WM8993_LEFT_LINE_INPUT_3_4_VOLUME, 0, 31, 0, |
227 | inpga_tlv), | 227 | inpga_tlv), |
228 | SOC_SINGLE("IN2L Switch", WM8993_LEFT_LINE_INPUT_3_4_VOLUME, 7, 1, 1), | 228 | 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), |
230 | 230 | ||
231 | SOC_SINGLE_TLV("IN2R Volume", WM8993_RIGHT_LINE_INPUT_3_4_VOLUME, 0, 31, 0, | 231 | SOC_SINGLE_TLV("IN2R Volume", WM8993_RIGHT_LINE_INPUT_3_4_VOLUME, 0, 31, 0, |
232 | inpga_tlv), | 232 | inpga_tlv), |
233 | SOC_SINGLE("IN2R Switch", WM8993_RIGHT_LINE_INPUT_3_4_VOLUME, 7, 1, 1), | 233 | 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), |
235 | 235 | ||
236 | SOC_SINGLE_TLV("MIXINL IN2L Volume", WM8993_INPUT_MIXER3, 7, 1, 0, | 236 | SOC_SINGLE_TLV("MIXINL IN2L Volume", WM8993_INPUT_MIXER3, 7, 1, 0, |
237 | inmix_sw_tlv), | 237 | inmix_sw_tlv), |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 999bb08cdfb1..776e6f418306 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -325,6 +325,7 @@ static int dapm_connect_mixer(struct snd_soc_dapm_context *dapm, | |||
325 | } | 325 | } |
326 | 326 | ||
327 | static int dapm_is_shared_kcontrol(struct snd_soc_dapm_context *dapm, | 327 | static int dapm_is_shared_kcontrol(struct snd_soc_dapm_context *dapm, |
328 | struct snd_soc_dapm_widget *kcontrolw, | ||
328 | const struct snd_kcontrol_new *kcontrol_new, | 329 | const struct snd_kcontrol_new *kcontrol_new, |
329 | struct snd_kcontrol **kcontrol) | 330 | struct snd_kcontrol **kcontrol) |
330 | { | 331 | { |
@@ -334,6 +335,8 @@ static int dapm_is_shared_kcontrol(struct snd_soc_dapm_context *dapm, | |||
334 | *kcontrol = NULL; | 335 | *kcontrol = NULL; |
335 | 336 | ||
336 | list_for_each_entry(w, &dapm->card->widgets, list) { | 337 | list_for_each_entry(w, &dapm->card->widgets, list) { |
338 | if (w == kcontrolw || w->dapm != kcontrolw->dapm) | ||
339 | continue; | ||
337 | for (i = 0; i < w->num_kcontrols; i++) { | 340 | for (i = 0; i < w->num_kcontrols; i++) { |
338 | if (&w->kcontrol_news[i] == kcontrol_new) { | 341 | if (&w->kcontrol_news[i] == kcontrol_new) { |
339 | if (w->kcontrols) | 342 | if (w->kcontrols) |
@@ -468,7 +471,7 @@ static int dapm_new_mux(struct snd_soc_dapm_context *dapm, | |||
468 | return -EINVAL; | 471 | return -EINVAL; |
469 | } | 472 | } |
470 | 473 | ||
471 | shared = dapm_is_shared_kcontrol(dapm, &w->kcontrol_news[0], | 474 | shared = dapm_is_shared_kcontrol(dapm, w, &w->kcontrol_news[0], |
472 | &kcontrol); | 475 | &kcontrol); |
473 | if (kcontrol) { | 476 | if (kcontrol) { |
474 | wlist = kcontrol->private_data; | 477 | wlist = kcontrol->private_data; |
diff --git a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c index d47beffedb0f..a91719d5918b 100644 --- a/sound/usb/6fire/firmware.c +++ b/sound/usb/6fire/firmware.c | |||
@@ -227,6 +227,7 @@ static int usb6fire_fw_ezusb_upload( | |||
227 | ret = usb6fire_fw_ihex_init(fw, rec); | 227 | ret = usb6fire_fw_ihex_init(fw, rec); |
228 | if (ret < 0) { | 228 | if (ret < 0) { |
229 | kfree(rec); | 229 | kfree(rec); |
230 | release_firmware(fw); | ||
230 | snd_printk(KERN_ERR PREFIX "error validating ezusb " | 231 | snd_printk(KERN_ERR PREFIX "error validating ezusb " |
231 | "firmware %s.\n", fwname); | 232 | "firmware %s.\n", fwname); |
232 | return ret; | 233 | return ret; |
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 2e969cbb393b..090e1930dfdc 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
@@ -403,7 +403,7 @@ static int snd_usb_cm106_boot_quirk(struct usb_device *dev) | |||
403 | static int snd_usb_cm6206_boot_quirk(struct usb_device *dev) | 403 | static int snd_usb_cm6206_boot_quirk(struct usb_device *dev) |
404 | { | 404 | { |
405 | int err, reg; | 405 | int err, reg; |
406 | int val[] = {0x200c, 0x3000, 0xf800, 0x143f, 0x0000, 0x3000}; | 406 | int val[] = {0x2004, 0x3000, 0xf800, 0x143f, 0x0000, 0x3000}; |
407 | 407 | ||
408 | for (reg = 0; reg < ARRAY_SIZE(val); reg++) { | 408 | for (reg = 0; reg < ARRAY_SIZE(val); reg++) { |
409 | err = snd_usb_cm106_write_int_reg(dev, reg, val[reg]); | 409 | err = snd_usb_cm106_write_int_reg(dev, reg, val[reg]); |