diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-27 10:53:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-27 10:53:06 -0500 |
commit | ea9f7a67a24a1b3b81cda5d15c79eda8613f1deb (patch) | |
tree | e22ad0c5ae148297a494be7fe1dc30d3b805123a /sound/pci | |
parent | 74ea15d909b31158f9b63190a95b52bc05586d4b (diff) | |
parent | b3a81520bd37a28f77cb0f7002086fb14061824d (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Fix silent output on Haier W18 laptop
ALSA: hda: set mute led polarity for laptops with buggy BIOS based on SSID
ALSA: hda - Fix silent output on ASUS A6Rp
ALSA: Fix memory leak on error in snd_compr_set_params()
ALSA: ymfpci - Don't create invalid PCM & mixers when AC97 doesn't support
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 11 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 9 | ||||
-rw-r--r-- | sound/pci/ymfpci/ymfpci.c | 21 | ||||
-rw-r--r-- | sound/pci/ymfpci/ymfpci_main.c | 21 |
4 files changed, 46 insertions, 16 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c95c8bde12d0..0db1dc49382b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -5586,6 +5586,7 @@ static const struct hda_amp_list alc861_loopbacks[] = { | |||
5586 | /* Pin config fixes */ | 5586 | /* Pin config fixes */ |
5587 | enum { | 5587 | enum { |
5588 | PINFIX_FSC_AMILO_PI1505, | 5588 | PINFIX_FSC_AMILO_PI1505, |
5589 | PINFIX_ASUS_A6RP, | ||
5589 | }; | 5590 | }; |
5590 | 5591 | ||
5591 | static const struct alc_fixup alc861_fixups[] = { | 5592 | static const struct alc_fixup alc861_fixups[] = { |
@@ -5597,9 +5598,19 @@ static const struct alc_fixup alc861_fixups[] = { | |||
5597 | { } | 5598 | { } |
5598 | } | 5599 | } |
5599 | }, | 5600 | }, |
5601 | [PINFIX_ASUS_A6RP] = { | ||
5602 | .type = ALC_FIXUP_VERBS, | ||
5603 | .v.verbs = (const struct hda_verb[]) { | ||
5604 | /* node 0x0f VREF seems controlling the master output */ | ||
5605 | { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50 }, | ||
5606 | { } | ||
5607 | }, | ||
5608 | }, | ||
5600 | }; | 5609 | }; |
5601 | 5610 | ||
5602 | static const struct snd_pci_quirk alc861_fixup_tbl[] = { | 5611 | static const struct snd_pci_quirk alc861_fixup_tbl[] = { |
5612 | SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", PINFIX_ASUS_A6RP), | ||
5613 | SND_PCI_QUIRK(0x1584, 0x2b01, "Haier W18", PINFIX_ASUS_A6RP), | ||
5603 | SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", PINFIX_FSC_AMILO_PI1505), | 5614 | SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", PINFIX_FSC_AMILO_PI1505), |
5604 | {} | 5615 | {} |
5605 | }; | 5616 | }; |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 336cfcd324f9..948f0be2f4f3 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -4870,7 +4870,14 @@ static int find_mute_led_cfg(struct hda_codec *codec, int default_polarity) | |||
4870 | /* BIOS bug: unfilled OEM string */ | 4870 | /* BIOS bug: unfilled OEM string */ |
4871 | if (strstr(dev->name, "HP_Mute_LED_P_G")) { | 4871 | if (strstr(dev->name, "HP_Mute_LED_P_G")) { |
4872 | set_hp_led_gpio(codec); | 4872 | set_hp_led_gpio(codec); |
4873 | spec->gpio_led_polarity = 1; | 4873 | switch (codec->subsystem_id) { |
4874 | case 0x103c148a: | ||
4875 | spec->gpio_led_polarity = 0; | ||
4876 | break; | ||
4877 | default: | ||
4878 | spec->gpio_led_polarity = 1; | ||
4879 | break; | ||
4880 | } | ||
4874 | return 1; | 4881 | return 1; |
4875 | } | 4882 | } |
4876 | } | 4883 | } |
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c index e57b89e8aa89..94ab728f5ca8 100644 --- a/sound/pci/ymfpci/ymfpci.c +++ b/sound/pci/ymfpci/ymfpci.c | |||
@@ -286,17 +286,22 @@ static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci, | |||
286 | snd_card_free(card); | 286 | snd_card_free(card); |
287 | return err; | 287 | return err; |
288 | } | 288 | } |
289 | if ((err = snd_ymfpci_pcm_4ch(chip, 2, NULL)) < 0) { | 289 | err = snd_ymfpci_mixer(chip, rear_switch[dev]); |
290 | if (err < 0) { | ||
290 | snd_card_free(card); | 291 | snd_card_free(card); |
291 | return err; | 292 | return err; |
292 | } | 293 | } |
293 | if ((err = snd_ymfpci_pcm2(chip, 3, NULL)) < 0) { | 294 | if (chip->ac97->ext_id & AC97_EI_SDAC) { |
294 | snd_card_free(card); | 295 | err = snd_ymfpci_pcm_4ch(chip, 2, NULL); |
295 | return err; | 296 | if (err < 0) { |
296 | } | 297 | snd_card_free(card); |
297 | if ((err = snd_ymfpci_mixer(chip, rear_switch[dev])) < 0) { | 298 | return err; |
298 | snd_card_free(card); | 299 | } |
299 | return err; | 300 | err = snd_ymfpci_pcm2(chip, 3, NULL); |
301 | if (err < 0) { | ||
302 | snd_card_free(card); | ||
303 | return err; | ||
304 | } | ||
300 | } | 305 | } |
301 | if ((err = snd_ymfpci_timer(chip, 0)) < 0) { | 306 | if ((err = snd_ymfpci_timer(chip, 0)) < 0) { |
302 | snd_card_free(card); | 307 | snd_card_free(card); |
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index 03ee4e365311..12a9a2b03387 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c | |||
@@ -1614,6 +1614,14 @@ static int snd_ymfpci_put_dup4ch(struct snd_kcontrol *kcontrol, struct snd_ctl_e | |||
1614 | return change; | 1614 | return change; |
1615 | } | 1615 | } |
1616 | 1616 | ||
1617 | static struct snd_kcontrol_new snd_ymfpci_dup4ch __devinitdata = { | ||
1618 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
1619 | .name = "4ch Duplication", | ||
1620 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, | ||
1621 | .info = snd_ymfpci_info_dup4ch, | ||
1622 | .get = snd_ymfpci_get_dup4ch, | ||
1623 | .put = snd_ymfpci_put_dup4ch, | ||
1624 | }; | ||
1617 | 1625 | ||
1618 | static struct snd_kcontrol_new snd_ymfpci_controls[] __devinitdata = { | 1626 | static struct snd_kcontrol_new snd_ymfpci_controls[] __devinitdata = { |
1619 | { | 1627 | { |
@@ -1642,13 +1650,6 @@ YMFPCI_DOUBLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,VOLUME), 1, YDSXGR_SPDIFLOOPVOL), | |||
1642 | YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH), 0, YDSXGR_SPDIFOUTCTRL, 0), | 1650 | YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH), 0, YDSXGR_SPDIFOUTCTRL, 0), |
1643 | YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), 0, YDSXGR_SPDIFINCTRL, 0), | 1651 | YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), 0, YDSXGR_SPDIFINCTRL, 0), |
1644 | YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("Loop",NONE,NONE), 0, YDSXGR_SPDIFINCTRL, 4), | 1652 | YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("Loop",NONE,NONE), 0, YDSXGR_SPDIFINCTRL, 4), |
1645 | { | ||
1646 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
1647 | .name = "4ch Duplication", | ||
1648 | .info = snd_ymfpci_info_dup4ch, | ||
1649 | .get = snd_ymfpci_get_dup4ch, | ||
1650 | .put = snd_ymfpci_put_dup4ch, | ||
1651 | }, | ||
1652 | }; | 1653 | }; |
1653 | 1654 | ||
1654 | 1655 | ||
@@ -1838,6 +1839,12 @@ int __devinit snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch) | |||
1838 | if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_ymfpci_controls[idx], chip))) < 0) | 1839 | if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_ymfpci_controls[idx], chip))) < 0) |
1839 | return err; | 1840 | return err; |
1840 | } | 1841 | } |
1842 | if (chip->ac97->ext_id & AC97_EI_SDAC) { | ||
1843 | kctl = snd_ctl_new1(&snd_ymfpci_dup4ch, chip); | ||
1844 | err = snd_ctl_add(chip->card, kctl); | ||
1845 | if (err < 0) | ||
1846 | return err; | ||
1847 | } | ||
1841 | 1848 | ||
1842 | /* add S/PDIF control */ | 1849 | /* add S/PDIF control */ |
1843 | if (snd_BUG_ON(!chip->pcm_spdif)) | 1850 | if (snd_BUG_ON(!chip->pcm_spdif)) |