From: David Henningsson <david.henningsson@canonical.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Re: [RFC PATCH] Fixup automute for Realtek auto parser
Date: Fri, 16 Sep 2011 12:45:06 +0200 [thread overview]
Message-ID: <4E7328B2.2080501@canonical.com> (raw)
In-Reply-To: <s5haaa4n6sn.wl%tiwai@suse.de>
On 09/16/2011 12:03 PM, Takashi Iwai wrote:
> At Fri, 16 Sep 2011 11:35:31 +0200,
> Takashi Iwai wrote:
>>
>> At Fri, 16 Sep 2011 11:22:01 +0200,
>> David Henningsson wrote:
>>>
>>> [1<text/plain; ISO-8859-1 (7bit)>]
>>> On 09/16/2011 10:31 AM, Takashi Iwai wrote:
>>>> At Fri, 16 Sep 2011 10:01:48 +0200,
>>>> David Henningsson wrote:
>>>>>
>>>>> The ~6 months old functionality for configurable automuting is broken
>>>>> for the case that the user has only HP and LO (no speakers) - basically
>>>>> there is an "Automute mode" control, but enabling it does nothing. While
>>>>> fixing that, I also took the liberty of refactoring/rewriting some of
>>>>> that code, in order to make it easier to understand and maintain.
>>>>>
>>>>> Takashi, given you approve/like these changes, I'll go ahead and fix up
>>>>> the quirk files to fit the new variable names.
>>>>
>>>> I'm fine with renames but let's split patches: first fix the bug
>>>> of non-working auto-mute control, then refactoring. The former
>>>> should go to 3.1 while the latter is queued to 3.2.
>>>
>>> Ok. If it also should go to 3.0, feel free to add cc: stable@kernel.org
>>> (hmm, is that working even though kernel.org is down?)
>>>
>>> Here comes the 3.1 part of the patch. If you're happy with it, commit it
>>> and I'll continue with the 3.2 renames.
>>
>> Hm, it's more complicated than I wanted.
>>
>> Could you have an example codec proc or alsa-info.sh file to simulate
>> here? The logic is already there, so a few lines of corrections
>> should suffice to fix the behavior.
>
> I guess the oneliner below should fix the bug.
> Could you check it?
>
>
> thanks,
>
> Takashi
>
> ---
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index 70ba45e..5c4625e 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -556,7 +556,7 @@ static void update_speakers(struct hda_codec *codec)
> if (spec->autocfg.line_out_pins[0] == spec->autocfg.hp_pins[0] ||
> spec->autocfg.line_out_pins[0] == spec->autocfg.speaker_pins[0])
> return;
> - if (!spec->automute_lines || !spec->automute)
> + if ((spec->automute_hp_lo&& !spec->automute_lines) || !spec->automute)
> on = 0;
> else
> on = spec->jack_present;
>
It does in this particular case, but it's very confusing that
spec->automute_lines can be 0 while the lines are still automuted. To
avoid such confusion, a more complicated patch is needed.
Honestly, would you have accepted such a patch if I were the one
proposing it? :-)
--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
next prev parent reply other threads:[~2011-09-16 10:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 8:01 [RFC PATCH] Fixup automute for Realtek auto parser David Henningsson
2011-09-16 8:31 ` Takashi Iwai
2011-09-16 9:22 ` David Henningsson
2011-09-16 9:35 ` Takashi Iwai
2011-09-16 10:03 ` Takashi Iwai
2011-09-16 10:45 ` David Henningsson [this message]
2011-09-16 11:07 ` Takashi Iwai
2011-09-16 11:22 ` David Henningsson
2011-09-16 12:44 ` Takashi Iwai
2011-09-16 14:22 ` David Henningsson
2011-09-16 14:30 ` Takashi Iwai
2011-09-19 9:28 ` David Henningsson
2011-09-19 9:37 ` 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=4E7328B2.2080501@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.