From: Takashi Iwai <tiwai@suse.de>
To: David Henningsson <david.henningsson@canonical.com>
Cc: alsa-devel@alsa-project.org, 939161@bugs.launchpad.net
Subject: Re: [PATCH] ALSA: hda - Remove ignore_misc_bit
Date: Fri, 07 Sep 2012 12:01:03 +0200 [thread overview]
Message-ID: <s5hligmw3s0.wl%tiwai@suse.de> (raw)
In-Reply-To: <1346995544-6754-1-git-send-email-david.henningsson@canonical.com>
At Fri, 7 Sep 2012 07:25:44 +0200,
David Henningsson wrote:
>
> The purpose of this flag is unclear. If the problem is that some machines
> have broken misc/NO_PRESENCE bits, they should be fixed by pin fixups.
>
> In addition, this causes jack detection functionality to be flawed on
> the M31EI, where there are two jacks without jack detection (which is
> properly marked as NO_PRESENCE), but due to ignore_misc_bit, these
> jacks are instead being reported as being present but always unplugged.
>
> BugLink: https://bugs.launchpad.net/bugs/939161
> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
So this will fix this one case but will break some others certainly.
It's a difficult to judge, but more removal is better, so I'll take
this.
But I still wonder why PulseAudio cares the headphone jack state even
though this has only one output at all?
Takashi
> ---
> sound/pci/hda/hda_auto_parser.c | 4 ----
> sound/pci/hda/hda_codec.h | 1 -
> sound/pci/hda/hda_jack.c | 5 ++---
> 3 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c
> index 4f7d2df..9acd5a9 100644
> --- a/sound/pci/hda/hda_auto_parser.c
> +++ b/sound/pci/hda/hda_auto_parser.c
> @@ -141,7 +141,6 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec,
> memset(sequences_hp, 0, sizeof(sequences_hp));
> assoc_line_out = 0;
>
> - codec->ignore_misc_bit = true;
> end_nid = codec->start_nid + codec->num_nodes;
> for (nid = codec->start_nid; nid < end_nid; nid++) {
> unsigned int wid_caps = get_wcaps(codec, nid);
> @@ -157,9 +156,6 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec,
> continue;
>
> def_conf = snd_hda_codec_get_pincfg(codec, nid);
> - if (!(get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) &
> - AC_DEFCFG_MISC_NO_PRESENCE))
> - codec->ignore_misc_bit = false;
> conn = get_defcfg_connect(def_conf);
> if (conn == AC_JACK_PORT_NONE)
> continue;
> diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
> index 8fd9f63..ee4ae8e 100644
> --- a/sound/pci/hda/hda_codec.h
> +++ b/sound/pci/hda/hda_codec.h
> @@ -861,7 +861,6 @@ struct hda_codec {
> unsigned int no_sticky_stream:1; /* no sticky-PCM stream assignment */
> unsigned int pins_shutup:1; /* pins are shut up */
> unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */
> - unsigned int ignore_misc_bit:1; /* ignore MISC_NO_PRESENCE bit */
> unsigned int no_jack_detect:1; /* Machine has no jack-detection */
> unsigned int pcm_format_first:1; /* PCM format must be set first */
> unsigned int epss:1; /* supporting EPSS? */
> diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c
> index aaccc02..c9333c9 100644
> --- a/sound/pci/hda/hda_jack.c
> +++ b/sound/pci/hda/hda_jack.c
> @@ -26,9 +26,8 @@ bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid)
> return false;
> if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT))
> return false;
> - if (!codec->ignore_misc_bit &&
> - (get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) &
> - AC_DEFCFG_MISC_NO_PRESENCE))
> + if (get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) &
> + AC_DEFCFG_MISC_NO_PRESENCE)
> return false;
> if (!(get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP))
> return false;
> --
> 1.7.9.5
>
next prev parent reply other threads:[~2012-09-07 10:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-07 5:25 [PATCH] ALSA: hda - Remove ignore_misc_bit David Henningsson
2012-09-07 10:01 ` Takashi Iwai [this message]
2012-09-07 11:26 ` David Henningsson
2012-09-07 11:59 ` Takashi Iwai
2012-09-07 12:17 ` David Henningsson
2012-09-07 12:36 ` Takashi Iwai
2012-09-07 12:47 ` David Henningsson
2012-09-07 13:09 ` Takashi Iwai
2012-09-07 14:28 ` David Henningsson
2012-09-07 14:32 ` Takashi Iwai
2012-09-07 15:39 ` Tanu Kaskinen
[not found] ` <CAN8cciYOMpjXfEpQxYFwTve94rz_LLzJyA=nBdCCdtwOJ5Lnbw@mail.gmail.com>
2012-09-17 8:44 ` Raymond Yau
2012-09-08 1:10 ` Raymond Yau
2012-09-09 7:50 ` Takashi Iwai
2012-09-14 2:10 ` Raymond Yau
2012-09-17 7:39 ` David Henningsson
2012-09-18 8:26 ` Takashi Iwai
2012-09-18 8:40 ` David Henningsson
2012-09-18 8:58 ` Takashi Iwai
2012-09-19 0:35 ` Raymond Yau
2012-09-25 15:38 ` Raymond Yau
2012-09-19 15:20 ` Raymond Yau
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=s5hligmw3s0.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=939161@bugs.launchpad.net \
--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;
as well as URLs for NNTP newsgroup(s).