All of lore.kernel.org
 help / color / mirror / Atom feed
From: "joey.jiaojg" <joey.jiaojg@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Raymond Yau <superquad.vortex2@gmail.com>,
	pshou@realtek.com.tw,
	ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	kailang@realtek.com.tw
Subject: Re: Bug report - patch_realtek.c - Laptop HP COMPAQ B1900 Series
Date: Thu, 16 Feb 2012 17:38:33 +0800	[thread overview]
Message-ID: <4F3CCE99.9060803@gmail.com> (raw)
In-Reply-To: <s5h39abruhz.wl%tiwai@suse.de>

YES, you are right on the assumption. I tried again many times of 
SET_GPIO_DATA between 0/1, speaker/headphone switches.
So is possible to merge into next ALSA release?

On 2012年02月16日 17:35, Takashi Iwai wrote:

> At Thu, 16 Feb 2012 10:04:09 +0800,
> Joey Jiao wrote:
>> 1. I changed to model=will to test without headphone
>> hda-verb /dev/snd/hwC0D0 0x0F~0x1B 0x707 0xC0 [NID=0x0F, 0x10~0x19, 0x1B]
>> Result: for sure not work as GPIO not open
>> 2. I changed to model=b1900 to test without headphone
>> hda-verb /dev/snd/hwC0D0 0x0F~0x1B 0x707 0xC0
>> Result: speaker still works. It's for sure.
>> 3. Then same condition as step 2 but change 0xC0 to 0x0
>> hda-verb /dev/snd/hwC0D0 0x0F~0x1B 0x707 0x0
>> Result: speaker doesn't work only when NID=0x0F; then I tried
>> param=0x40 and 0x80, when param=0x40, speaker works while param=0x80,
>> speaker doesn't work.
>> 4. Then I plugged in headphone.
>> Now the param =0x40 for NID=0x0F.
>> Result: Headphone works while speaker muted.
>> Then I changed param=0x80. (same result when param=0xC0)
>> Result: Headphone still works while speaker muted.
>> 5. Then I reboot with headphone plugged in to test your step 2.
>> YES, now the speaker muted while headphone works.
>> Then I do your cmds:
>> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 1
>> Result: headphone works, speaker muted
>> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 1
>> Result: headphone muted, speaker works
>> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 1
>> Result: headphone works, speaker muted
>> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0
>> Result: headphone muted, speaker works.
> And, if you run again
>    hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 1
> I guess the speaker will be muted and the headphone start working
> again, right?
>
>> Please noted the last two cmds, it's strange but it's true.
> If my guess is correct, it's not strange at all.  Your machine shares
> the same pin for both the headphone and the speaker outputs, but
> switches between them just by GPIO-out bit 0.  It's _not_ the master
> amp.
>
> In addition, the HP-amp bit (0x80) of 0x0f seems controlling the
> speaker amp.
>
>
> Takashi
>
>> Any additional tests?
>>
>> 在 2012年2月15日 下午11:04,Takashi Iwai<tiwai@suse.de>  写道:
>>> At Wed, 15 Feb 2012 22:45:27 +0800,
>>> joey.jiaojg wrote:
>>>> I think the only question below is about the automute, right?
>>> Not really.  The most important thing is to understand what's doing
>>> what.  Since your code can't be applied any longer at all to the
>>> latest code tree because of the fundamental code rewrite, we need to
>>> do it right.
>>>
>>> So, please check the following:
>>>
>>> 1. Does any pin correspond to the speaker output?  Try to change the
>>>    pin control of each pin between 0x10 and 0x19 via hda-verb while
>>>    the speaker output is active.  Does any pin change the speaker
>>>    output?
>>>
>>> 2. Plug your headphone.  Now the speaker is muted with your patch.
>>>    What happens when you run like below?
>>>
>>>         hda-verb /dev/snd/hwD0D0 0x01 SET_GPIO_MASK 1
>>>         hda-verb /dev/snd/hwD0D0 0x01 SET_GPIO_DIR 1
>>>         hda-verb /dev/snd/hwD0D0 0x01 SET_GPIO_DATA 1
>>>
>>>    Does the speaker starts playing again?  Then, what happens now
>>>    with:
>>>
>>>         hda-verb /dev/snd/hwD0D0 0x01 SET_GPIO_DATA 0
>>>
>>>    ??
>>>
>>>
>>> Takashi
>>
>>
>> -- 
>> -Joey Jiao
>>

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2012-02-16  9:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4F35C191.9080401@gmail.com>
2012-02-11  2:05 ` Bug report - patch_realtek.c - Laptop HP COMPAQ B1900 Series Jonathan Woithe
2012-02-15  0:50   ` Raymond Yau
     [not found]     ` <CAKOmCvoS+tgvyPZJey4gfFFq=Uz01pnZY7YvGbxgQPpAzQ7KCA@mail.gmail.com>
2012-02-15  1:29       ` Joey Jiao
2012-02-15  2:49         ` Raymond Yau
     [not found]           ` <4F3B761D.4060306@gmail.com>
2012-02-15  9:22             ` Takashi Iwai
2012-02-15  9:31               ` joey.jiaojg
2012-02-15  9:40                 ` Takashi Iwai
2012-02-15  9:45                   ` joey.jiaojg
2012-02-15  9:58                     ` Takashi Iwai
2012-02-15 10:06                       ` joey.jiaojg
2012-02-15 10:11                         ` Takashi Iwai
2012-02-15 13:14                           ` joey.jiaojg
2012-02-15 13:21                             ` Takashi Iwai
2012-02-15 14:45                               ` joey.jiaojg
2012-02-15 15:04                                 ` Takashi Iwai
2012-02-16  2:04                                   ` Joey Jiao
2012-02-16  3:41                                     ` joey.jiaojg
2012-02-16  9:36                                       ` Takashi Iwai
2012-02-16  9:35                                     ` Takashi Iwai
2012-02-16  9:38                                       ` joey.jiaojg [this message]
2012-02-16  9:41                                         ` Takashi Iwai
2012-02-16  9:42                                           ` Takashi Iwai
2012-02-16  9:52                                             ` joey.jiaojg

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=4F3CCE99.9060803@gmail.com \
    --to=joey.jiaojg@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=kailang@realtek.com.tw \
    --cc=pshou@realtek.com.tw \
    --cc=superquad.vortex2@gmail.com \
    --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.