From: David Henningsson <david.henningsson@canonical.com>
To: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: [PATCH] ALSA: hda - Add extra chmap for 2.1 outputs on ASUS laptops
Date: Thu, 31 Oct 2013 09:32:53 +0100 [thread overview]
Message-ID: <527215B5.7070805@canonical.com> (raw)
In-Reply-To: <1383151496-31684-1-git-send-email-tiwai@suse.de>
On 10/30/2013 05:44 PM, Takashi Iwai wrote:
> 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
Hmm, according to the bug report, the chmap (before this patch) was FL,
FR, RL, RR.
I thought this was already fixed; but if it isn't, it should probably be
fixed on a more generic level: e g, whenever there is a "Bass Speaker"
control, the chmap should also be changed.
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> sound/pci/hda/patch_realtek.c | 30 ++++++++++++++++++++++++++++--
> 1 file 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,
> "hda_codec: failed to override amp caps for NID 0x2\n");
> }
>
> +static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps[] = {
> + { .channels = 2,
> + .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } },
> + { .channels = 4,
> + .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
> + SNDRV_CHMAP_NA, SNDRV_CHMAP_LFE } }, /* LFE only on right */
> + { }
> +};
> +
> +/* override the 2.1 chmap */
> +static void alc662_fixup_bass_chmap(struct hda_codec *codec,
> + const struct hda_fixup *fix, int action)
> +{
> + if (action == HDA_FIXUP_ACT_BUILD) {
> + struct alc_spec *spec = codec->spec;
> + spec->gen.pcm_rec[0].stream[0].chmap = asus_pcm_2_1_chmaps;
> + }
> +}
> +
> enum {
> ALC662_FIXUP_ASPIRE,
> ALC662_FIXUP_IDEAPAD,
> @@ -4446,6 +4465,7 @@ enum {
> ALC662_FIXUP_INV_DMIC,
> ALC668_FIXUP_DELL_MIC_NO_PRESENCE,
> ALC668_FIXUP_HEADSET_MODE,
> + ALC662_FIXUP_BASS_CHMAP,
> };
>
> static const struct hda_fixup alc662_fixups[] = {
> @@ -4620,6 +4640,12 @@ static const struct hda_fixup alc662_fixups[] = {
> .type = HDA_FIXUP_FUNC,
> .v.func = alc_fixup_headset_mode_alc668,
> },
> + [ALC662_FIXUP_BASS_CHMAP] = {
> + .type = HDA_FIXUP_FUNC,
> + .v.func = alc662_fixup_bass_chmap,
> + .chained = true,
> + .chain_id = ALC662_FIXUP_ASUS_MODE4
> + },
> };
>
> static const struct snd_pci_quirk alc662_fixup_tbl[] = {
> @@ -4633,8 +4659,8 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
> SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
> SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
> SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
> - SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_ASUS_MODE4),
> - SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_ASUS_MODE4),
> + SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_CHMAP),
> + SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_CHMAP),
> SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
> SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2),
> SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
>
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
next prev parent reply other threads:[~2013-10-31 8:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 16:44 [PATCH] ALSA: hda - Add extra chmap for 2.1 outputs on ASUS laptops Takashi Iwai
2013-10-31 8:32 ` David Henningsson [this message]
2013-10-31 8:55 ` Takashi Iwai
2013-10-31 9:14 ` David Henningsson
2013-10-31 9:19 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=527215B5.7070805@canonical.com \
--to=david.henningsson@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.