From: Takashi Iwai <tiwai@suse.de>
To: David Henningsson <david.henningsson@canonical.com>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] ALSA: HDA: Pinfix quirk for HP Z200 Workstation
Date: Fri, 24 Jun 2011 11:10:38 +0200 [thread overview]
Message-ID: <s5hmxh7zjap.wl%tiwai@suse.de> (raw)
In-Reply-To: <s5h62nwzquo.wl%tiwai@suse.de>
At Thu, 23 Jun 2011 14:15:11 +0200,
Takashi Iwai wrote:
>
> At Thu, 23 Jun 2011 10:28:25 +0200,
> David Henningsson wrote:
> >
> > On 2011-06-23 09:28, Takashi Iwai wrote:
> > > At Wed, 22 Jun 2011 22:31:07 +0200,
> > > David Henningsson wrote:
> > >>
> > >> BIOS lists the internal speaker as an internal line-out. Change to
> > >> internal speaker + model=auto for better auto-mute capabilities.
> > >>
> > >> Relevant alsa-info is here:
> > >> https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/754964/+attachment/2002204/+files/alsa-info.txt
> > >
> > > Thanks, applied now.
> > >
> > > 3.0 should work even without this patch since line-out can be
> > > auto-muted now, but it's still more correct to show the speaker as
> > > speaker (e.g. the right mixer name). So, it's still good to have
> > > this kind of fix.
> >
> > I think it was not muted at all, because it is a mono pin, so it does
> > not show up in the autocfg->line_out_pins array. (Perhaps this should
> > change in the auto-mute behaviour?)
>
> Ah, right, these have the real line-out, too.
> (The auto-mute can handle mono as well, but before that, the mono pin
> has to be parsed properly :)
Looking further, another fix is to change the core-parser code like
below. Since this doesn't conflict with the pinfix you made, I'll
keep your fix for 3.0 but queue up for 3.1 kernel (in topic/hda
branch).
Takashi
---
Subject: [PATCH] ALSA: hda - Add a workaround for invalid line-out setups
Some BIOS set up the pin config wrongly as line-out although it's
supposed to be a speaker out. In most cases, though, we can judge
the validity by checking the connection type -- when it's FIXED,
mostly it's an invalid line-out but a speaker.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/hda_codec.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index a2388fc..654dc89 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -4590,7 +4590,7 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
unsigned int wid_caps = get_wcaps(codec, nid);
unsigned int wid_type = get_wcaps_type(wid_caps);
unsigned int def_conf;
- short assoc, loc;
+ short assoc, loc, conn, dev;
/* read all default configuration for pin complex */
if (wid_type != AC_WID_PIN)
@@ -4600,10 +4600,19 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
continue;
def_conf = snd_hda_codec_get_pincfg(codec, nid);
- if (get_defcfg_connect(def_conf) == AC_JACK_PORT_NONE)
+ conn = get_defcfg_connect(def_conf);
+ if (conn == AC_JACK_PORT_NONE)
continue;
loc = get_defcfg_location(def_conf);
- switch (get_defcfg_device(def_conf)) {
+ dev = get_defcfg_device(def_conf);
+
+ /* workaround for buggy BIOS setups */
+ if (dev == AC_JACK_LINE_OUT) {
+ if (conn == AC_JACK_PORT_FIXED)
+ dev = AC_JACK_SPEAKER;
+ }
+
+ switch (dev) {
case AC_JACK_LINE_OUT:
seq = get_defcfg_sequence(def_conf);
assoc = get_defcfg_association(def_conf);
--
1.7.5.4
prev parent reply other threads:[~2011-06-24 9:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-22 20:31 [PATCH] ALSA: HDA: Pinfix quirk for HP Z200 Workstation David Henningsson
2011-06-23 7:28 ` Takashi Iwai
2011-06-23 8:28 ` David Henningsson
2011-06-23 12:15 ` Takashi Iwai
2011-06-24 9:10 ` Takashi Iwai [this message]
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=s5hmxh7zjap.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=david.henningsson@canonical.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox