aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-10-30 12:41:12 -0400
committerTakashi Iwai <tiwai@suse.de>2013-10-30 12:41:12 -0400
commit8e38395360844806041ea69ab9690f5f174bc40c (patch)
treeebd4d861a9c430a2f445b10c228b55cfb7aab8f5 /sound/pci/hda/patch_realtek.c
parent8d684b430b0bc98117954a426a818a372824cb79 (diff)
ALSA: hda - Add extra chmap for 2.1 outputs on ASUS laptops
ASUS N56VZ and N76VZ laptops have a bass speaker but its output comes only from the right channel. This patch adds the extra chmap specific to these models. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=846531 Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 13ad49ca9357..2d7c86d81196 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4426,6 +4426,25 @@ static void alc272_fixup_mario(struct hda_codec *codec,
4426 "hda_codec: failed to override amp caps for NID 0x2\n"); 4426 "hda_codec: failed to override amp caps for NID 0x2\n");
4427} 4427}
4428 4428
4429static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps[] = {
4430 { .channels = 2,
4431 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } },
4432 { .channels = 4,
4433 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
4434 SNDRV_CHMAP_NA, SNDRV_CHMAP_LFE } }, /* LFE only on right */
4435 { }
4436};
4437
4438/* override the 2.1 chmap */
4439static void alc662_fixup_bass_chmap(struct hda_codec *codec,
4440 const struct hda_fixup *fix, int action)
4441{
4442 if (action == HDA_FIXUP_ACT_BUILD) {
4443 struct alc_spec *spec = codec->spec;
4444 spec->gen.pcm_rec[0].stream[0].chmap = asus_pcm_2_1_chmaps;
4445 }
4446}
4447
4429enum { 4448enum {
4430 ALC662_FIXUP_ASPIRE, 4449 ALC662_FIXUP_ASPIRE,
4431 ALC662_FIXUP_IDEAPAD, 4450 ALC662_FIXUP_IDEAPAD,
@@ -4446,6 +4465,7 @@ enum {
4446 ALC662_FIXUP_INV_DMIC, 4465 ALC662_FIXUP_INV_DMIC,
4447 ALC668_FIXUP_DELL_MIC_NO_PRESENCE, 4466 ALC668_FIXUP_DELL_MIC_NO_PRESENCE,
4448 ALC668_FIXUP_HEADSET_MODE, 4467 ALC668_FIXUP_HEADSET_MODE,
4468 ALC662_FIXUP_BASS_CHMAP,
4449}; 4469};
4450 4470
4451static const struct hda_fixup alc662_fixups[] = { 4471static const struct hda_fixup alc662_fixups[] = {
@@ -4620,6 +4640,12 @@ static const struct hda_fixup alc662_fixups[] = {
4620 .type = HDA_FIXUP_FUNC, 4640 .type = HDA_FIXUP_FUNC,
4621 .v.func = alc_fixup_headset_mode_alc668, 4641 .v.func = alc_fixup_headset_mode_alc668,
4622 }, 4642 },
4643 [ALC662_FIXUP_BASS_CHMAP] = {
4644 .type = HDA_FIXUP_FUNC,
4645 .v.func = alc662_fixup_bass_chmap,
4646 .chained = true,
4647 .chain_id = ALC662_FIXUP_ASUS_MODE4
4648 },
4623}; 4649};
4624 4650
4625static const struct snd_pci_quirk alc662_fixup_tbl[] = { 4651static const struct snd_pci_quirk alc662_fixup_tbl[] = {
@@ -4633,8 +4659,8 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
4633 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4659 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
4634 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4660 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
4635 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), 4661 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
4636 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_ASUS_MODE4), 4662 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_CHMAP),
4637 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_ASUS_MODE4), 4663 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_CHMAP),
4638 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT), 4664 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
4639 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2), 4665 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2),
4640 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), 4666 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),