From: Julian Sikorski <belegdol@gmail.com>
To: alsa-devel@alsa-project.org
Subject: Re: Clevo P170HM / Sager NP8170 audio
Date: Tue, 22 Nov 2011 13:45:20 +0100 [thread overview]
Message-ID: <jag5h0$ioh$1@dough.gmane.org> (raw)
In-Reply-To: <CAN8cciYju3PPZRHf8--oubYc7vVe7-X0D36iGEX=W=uxRpM9sg@mail.gmail.com>
W dniu 22.11.2011 06:17, Raymond Yau pisze:
> 2011/11/21 Julian Sikorski <belegdol@gmail.com>:
>> W dniu 21.11.2011 07:47, Raymond Yau pisze:
>>> 2011/11/19 Julian Sikorski <belegdol@gmail.com>:
>>>>>> From the official (non-service) manual, page 309:
>>>>>>
>>>>>
>>>>> Refer to P170HM 's photo in user manual
>>>>>
>>>>> There are 3 speakers and a subwoofer at the bottom of the laptop and
>>>>> two speakers at the top
>>>>>
>>>>> Refer to user manual of P150HM,
>>>>>
>>>>> Plug the front speaker cables into the Headphone-Out Jack.
>>>>>
>>>>> • Line-In Jack = Rear Speaker Out
>>>>> • Microphone-In Jack = Center/Subwoofer Speaker Out
>>>>> • S/PDIF-Out Jack = Side Speaker Out (for 7.1 Surround Sound Only)
>>>
>>> You may need to ask Takashi , David, PA developers and Media
>>> controller developers how to handle this case
>>>
>>> since it may need to set_pin_ctl to PIN_HP and PIN_OUT of 0x1b and
>>> retasking of input jacks as output whether PA or Media controller API
>>> expect to change the name of the volume control and switch from
>>> "Headphone" to "Front" by hda-reconfig
>>>
>>> http://thread.gmane.org/gmane.linux.alsa.devel/91334
>>>
>>>>>
>>>>> 7. As you plug in each cable a dialog box will pop up (see “Auto Popup
>>>>> Dialog” on
>>>>> page 2 - 9).
>>>>>
>>>>> Auto Popup Dialog mean support jack detect
>>>>>
>>>>> you can try David's hda-jack-sense-test.py
>>>>>
>>>>> http://thread.gmane.org/gmane.linux.alsa.devel/85051
>>>>
>>>> Yes, it is working:
>>>> [julas@snowball2 ~]$ sudo python hda-jack-sense-test.py
>>>> Pin 0x18 (Black Mic): present = No
>>>> Pin 0x1a (Black Line In): present = No
>>>> Pin 0x1b (Black HP Out): present = Yes
>>>> [julas@snowball2 ~]$ sudo python hda-jack-sense-test.py
>>>> Pin 0x18 (Black Mic): present = No
>>>> Pin 0x1a (Black Line In): present = No
>>>> Pin 0x1b (Black HP Out): present = No
>>>> [julas@snowball2 ~]$ sudo python hda-jack-sense-test.py
>>>> Pin 0x18 (Black Mic): present = No
>>>> Pin 0x1a (Black Line In): present = Yes
>>>> Pin 0x1b (Black HP Out): present = No
>>>> [julas@snowball2 ~]$ sudo python hda-jack-sense-test.py
>>>> Pin 0x18 (Black Mic): present = Yes
>>>> Pin 0x1a (Black Line In): present = No
>>>> Pin 0x1b (Black HP Out): present = No
>>>
>>>>>
>>>>>
>>>>> Is Node 0x17 also the side jack of your p150hm ?
>>>>> pin cap support Detect and Trigger but Misc = NO_PRESENCE
>>>>
>>>> Yes, it is between mic and line in jacks, third one from the front. The
>>>> only difference is that there is red light coming out of it.
>>>>
>>>
>>> you can use hda-verb to set the pin default of 0x17 and use
>>> hda-jack-sense-test retest the side jack
>>
>> Well, it kind of works:
>> * I was able to assign 0x01011013 to pin 0x17 using user_pin_configs
>> * it then shows up in hda-jack-sense-test.py, which detects if the jack
>> is connected
>> $ sudo python hda-jack-sense-test.py
>> [sudo] password for julas:
>> Pin 0x17 (Black Line Out): present = Yes
>> Pin 0x18 (Black Mic): present = No
>> Pin 0x1a (Black Line In): present = No
>> Pin 0x1b (Black HP Out): present = No
>> * for some reason this program started locking up after showing the
>> output, I am not sure if this is related.
>> I then applied your patch on top of Fedora 3.1.1 kernel (crude patch
>> attached). After reboot:
>> * hda-jack-sense-test.py was still working, without lockups this time
>> * alsamixer -c0 revealed a new "Front" slider, which was controlling the
>> volume on 0x17
>> * there was still no 8-channel mode (probably related to what you wrote
>> below)
>> * there were more options for auto mute (Disabled, Speaker Only, Line
>> Out+Speaker)
>> * here is the new alsa-info.sh:
>> http://www.alsa-project.org/db/?f=923b75ad3997dc8f5878852e327f9b999a196052
>>
>
> You can add the following code to assign dac and pin in alc_auto_fill_dac_nids()
>
> However this cannot create "Headphone Playback Volume" and "Speaker
> Playback Volume"
>
I am also not sure what you mean by HP and Speaker Playback Volumes - it
is working now, even with unpatched Fedora kernels (3.1.1-2.fc16).
With this patch applied on top of sound/master tree it is much worse:
* Front and HP sliders are gone
* only 2-ch sound is working, changing to 4, 6, or 8 does not produce
output on any of the other jacks
* just to be sure, I checked sound/master tree without both of your
patches, and both Headphone/Speaker, as well as 4 and 6 channel sound
are working fine.
>
> again:
> /* set num_dacs once to full for alc_auto_look_for_dac() */
> spec->multiout.num_dacs = cfg->line_outs;
> spec->multiout.hp_out_nid[0] = 0;
> spec->multiout.extra_out_nid[0] = 0;
> memset(spec->private_dac_nids, 0, sizeof(spec->private_dac_nids));
> spec->multiout.dac_nids = spec->private_dac_nids;
>
> +/*
> + may check bit 2 of SKU ID in alc_subsystem_id() to determine this is
> a laptop with 4 jacks
> + * 2 : 0 --> Desktop, 1 --> Laptop
> +*/
> + if (cfg->hp_outs == 1 && cfg->line_outs == 1 && cfg->speaker_outs >= 1) {
> + num_pins = 0;
> + spec->private_dac_nids[0] = alc_auto_look_for_dac(codec, cfg->hp_pins[0]);
> + spec->multi_io[num_pins].pin = cfg->hp_pins[0];
> + spec->multi_io[num_pins].dac = spec->private_dac_nids[0];
> + num_pins++;
> + defcfg = snd_hda_codec_get_pincfg(codec, cfg->hp_pins[0]);
> + location = get_defcfg_location(defcfg);
> + spec->multiout.num_dacs = 1;
> + num_pins = alc_auto_fill_multi_ios(codec, location, 0);
> + if (num_pins > 0) {
> + spec->multi_ios = num_pins;
> + spec->ext_channel_count = 2;
> + }
> + spec->private_dac_nids[3] = alc_auto_look_for_dac(codec,
> cfg->line_out_pins[0]);
> + spec->multi_io[num_pins].pin = cfg->line_out_pins[0];
> + spec->multi_io[num_pins].dac = spec->private_dac_nids[3];
> + spec->multi_ios++;
> + spec->multiout.max_channels = 2;
> + spec->multiout.num_dacs = 1;
> +/*
> + Still missing
> + 1) need to swap dac of hp with speaker to create speaker volume
> + 2) hda-jack of mic, line and side
> + 3) p170hm has 5.1 speakers
> +*/
> + spec->multiout.extra_out_nid[0] =
> + get_dac_if_single(codec, cfg->speaker_pins[0]);
> + return 0;
> + }
>
>
>>>
>>> To add the missing pin default of side jack 0x17
>>>
>>> ALC662_FIXUP_ASUS_MODE8,
>>> + ALC892_FIXUP_CLEVO_4ST_8CH,
>>> };
>>>
>>> static const struct alc_fixup alc662_fixups[] = {
>>>
>>>
>>> + [ALC892_FIXUP_CLEVO_4ST_8CH] = {
>>> + .type = ALC_FIXUP_PINS,
>>> + .v.pins = (const struct alc_pincfg[]) {
>>> +/*
>>> + need to be same location as the other jack
>>> + may need to change the default association and sequence since
>>> + Lower Default Association values would be higher in priority for resources
>>> + such as processing nodes or Input and Output Converters.
>>> + A value of 0000b is reserved and should not be used
>>> +*/
>>> + { 0x17, 0x01011013 }, /* Side */
>>> + { }
>>> + },
>>> + },
>>>
>>>
>>> + SND_PCI_QUIRK(0x1558, 0x5102, "Clevo P150HM", ALC892_FIXUP_CLEVO_4ST_8CH),
>>> + SND_PCI_QUIRK(0x1558, 0x7100, "Clevo P170HM", ALC892_FIXUP_CLEVO_4ST_8CH),
>>>
>>> SImilar case are those notebooks hda-emu/codecs/alc1200-msi-gx620
>>> which has 1 hp(green), 1 line-in(blue), 1 ext-mic(pink) and 1 line
>>> out(grey) at same location (ext rear) for surround71 (and also 1
>>> speakers, 1 int mic)
>>>
>>>
>>> hda_codec: ALC1200: BIOS auto-probing.
>>> hda_codec: ALC1200: SKU not ready 0x598301f0
>>> autoconfig: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:line
>>> speaker_outs=1 (0x1b/0x0/0x0/0x0/0x0)
>>> hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
>>> mono: mono_out=0x0
>>> dig-out=0x1e/0x0
>>> inputs: Mic=0x18 Internal Mic=0x19 Line=0x1a
>>>
>>>
>>> CTRL: add: Line-Out Jack:0
>>> CTRL: add: Headphone Jack:0
>>> CTRL: add: Mic Jack:0
>>> CTRL: add: Line Jack:0
>>>
>>>> get 1
>>> 1 Channel Mode:0
>>> ITEM: 0:2ch, 1:4ch, 2:6ch, VAL: [2ch]
>>>
>>> what is missing are
>>> 1) 8ch in "Channel Mode" ,
>>> 2) Side Playback Volume
>>> 3)Side Playback Switch
>>>
>>> Study the logic to add 8ch and "side" in
>>>
>>> 1) alc_auto_fill_dac_nids()
>>> 2) alc_auto_fill_multi_ios() which add line-in and mic jack to multi_ios,
>>
>> I am sorry, I am afraid I lack the knowledge to do that. What I can do
>> is test patches and commands, but writing new code is beyond my skillset.
>>
>>>
>>>
>>> This mean that when switch to 6/8 channel mode, it will conflict with
>>> automic detection since the pin cap alc892 's mic jack does not
>>> support impedance sense and the driver does not know the plug is mic
>>> or speaker by measuring the impedance
>>>
>>> The driver have to disable automic detection when user switch "channel
>>> mode" to 6ch/8ch as the user should still able to use the internal mic
>>> when the external mic jack is retasked as output
>>>
>>>
>>>>>
>>>>> which node is your subwoofer ?
>>>>
>>>> This I have not figured out yet unfortunately. Keep in mind that in
>>>> windows you need THX TruStudio PRO to get it working, and the config is
>>>> advertised as stereo. There was a discussion about this on
>>>> notebookreview forums [1], so maybe it configured in some weird way?
>>>>
>>>
>>> you have to find out whether subwoofer is connected to 0x16 of your
>>> p150hm since your mic jack (retasked as clfe) is connected to dac 0x4.
>>
>> Simply changing this pin to out and unmuting it did not work (this is
>> the way I discovered 0x17.
>>
next prev parent reply other threads:[~2011-11-22 12:45 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-20 7:33 Clevo P170HM / Sager NP8170 audio Andrew Mahone
2011-11-08 5:42 ` Julian Sikorski
2011-11-16 13:08 ` Raymond Yau
2011-11-16 15:15 ` Julian Sikorski
2011-11-17 2:08 ` Raymond Yau
2011-11-17 8:46 ` Julian Sikorski
2011-11-17 8:55 ` Julian Sikorski
2011-11-19 2:31 ` Raymond Yau
2011-11-19 9:11 ` Julian Sikorski
2011-11-21 6:47 ` Raymond Yau
2011-11-21 11:39 ` Julian Sikorski
2011-11-22 5:17 ` Raymond Yau
2011-11-22 12:45 ` Julian Sikorski [this message]
2011-11-25 6:39 ` Raymond Yau
2011-11-25 12:10 ` Julian Sikorski
2011-11-28 0:42 ` Raymond Yau
2011-11-28 10:27 ` Julian Sikorski
2011-11-28 11:46 ` Raymond Yau
2011-11-28 12:02 ` Julian Sikorski
2011-11-28 12:34 ` Julian Sikorski
2011-11-28 23:45 ` Raymond Yau
2011-11-29 10:25 ` Julian Sikorski
2011-12-01 16:35 ` Julian Sikorski
2011-12-02 0:52 ` Raymond Yau
2011-12-02 15:41 ` Julian Sikorski
2011-12-03 23:59 ` Raymond Yau
2011-12-04 12:41 ` Julian Sikorski
2011-11-24 9:20 ` Julian Sikorski
2011-11-24 10:03 ` Julian Sikorski
2011-11-24 10:30 ` Julian Sikorski
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='jag5h0$ioh$1@dough.gmane.org' \
--to=belegdol@gmail.com \
--cc=alsa-devel@alsa-project.org \
/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.