Re: [alsa-devel] [pulseaudio-discuss] What-did-you-plugin-dialog
:
can post the output of alsa-info.sh after jack retasking ?
Before retasking:
http://www.alsa-project.org/db/?f=fd97b8194e205b4f91127bca74ad7c9b2cd93ab9
After retasking blue line in, pin ID 0x1a as Line out (Side):
http://www.alsa-project.org/db/?f=d56f9a6d0692c9a8d5c88f43100a6cb78407c163
Note that retasking did not work: attempting to play a 8-channel wav file through hw:1,0 resulted in an "Invalid argument" error.
FWIW, here is what hdajackretask printed to the console:
0x11 0x99430130 0x12 0x4037c540 0x14 0x01014010 0x15 0x01011012 0x16 0x01016011 0x17 0x411111f0 0x18 0x01a19050 0x19 0x02a19060 0x1a 0x01014413 0x1b 0x02214020 0x1c 0x411111f0 0x1d 0x4045e601 0x1e 0x01452140 0x1f 0x411111f0 1
you need root privilege for hdajackretask to write the firmware file to /lib/firmware and modify /etc/modprobe.d/alsa-lbase.conf to use the firmware file
can you try the patch which add "channel mode" control which allow you to switch from 6ch to 8ch
it is not clear that the "Line jack" control is used for detect the blue jack state or reflect the line In is no longer available after it is retasked as output jack
2013/12/1 Raymond Yau superquad.vortex2@gmail.com:
:
can post the output of alsa-info.sh after jack retasking ?
Before retasking:
http://www.alsa-project.org/db/?f=fd97b8194e205b4f91127bca74ad7c9b2cd93ab9
After retasking blue line in, pin ID 0x1a as Line out (Side):
http://www.alsa-project.org/db/?f=d56f9a6d0692c9a8d5c88f43100a6cb78407c163
Note that retasking did not work: attempting to play a 8-channel wav file through hw:1,0 resulted in an "Invalid argument" error.
FWIW, here is what hdajackretask printed to the console:
0x11 0x99430130 0x12 0x4037c540 0x14 0x01014010 0x15 0x01011012 0x16 0x01016011 0x17 0x411111f0 0x18 0x01a19050 0x19 0x02a19060 0x1a 0x01014413 0x1b 0x02214020 0x1c 0x411111f0 0x1d 0x4045e601 0x1e 0x01452140 0x1f 0x411111f0 1
you need root privilege for hdajackretask to write the firmware file to /lib/firmware and modify /etc/modprobe.d/alsa-lbase.conf to use the firmware file
can you try the patch which add "channel mode" control which allow you to switch from 6ch to 8ch
I have tested the patch. In 8ch mode, it works without any overrides in the sense that the side channels go to the blue jack if I choose 8ch mode. In the 6ch mode, the line input also works (tested by using headphones as a very bad microphone-like source).
Here is alsa-info in the 6ch mode:
http://www.alsa-project.org/db/?f=d152698d4b2d9589d4c5f14e0c8e6d4978c8fbd0
And in 8ch mode:
http://www.alsa-project.org/db/?f=4d5d14fbb559819fd82e7731e656be7efcfab439
Pulseaudio is not smart enough to decide by itself that it can toggle the control and add 7.1 profiles. If I toggle the control manually and restart pulseaudio, they appear.
If the role of the "Line jack" control is still unclear, just say so and tell me what to do to figure it out.
Before retasking:
http://www.alsa-project.org/db/?f=fd97b8194e205b4f91127bca74ad7c9b2cd93ab9
After retasking blue line in, pin ID 0x1a as Line out (Side):
http://www.alsa-project.org/db/?f=d56f9a6d0692c9a8d5c88f43100a6cb78407c163
Note that retasking did not work: attempting to play a 8-channel wav file through hw:1,0 resulted in an "Invalid argument" error.
FWIW, here is what hdajackretask printed to the console:
0x11 0x99430130 0x12 0x4037c540 0x14 0x01014010 0x15 0x01011012 0x16 0x01016011 0x17 0x411111f0 0x18 0x01a19050 0x19 0x02a19060 0x1a 0x01014413 0x1b 0x02214020 0x1c 0x411111f0 0x1d 0x4045e601 0x1e 0x01452140 0x1f 0x411111f0 1
you need root privilege for hdajackretask to write the firmware file to /lib/firmware and modify /etc/modprobe.d/alsa-lbase.conf to use the
firmware
file
can you try the patch which add "channel mode" control which allow you to switch from 6ch to 8ch
I have tested the patch. In 8ch mode, it works without any overrides in the sense that the side channels go to the blue jack if I choose 8ch mode. In the 6ch mode, the line input also works (tested by using headphones as a very bad microphone-like source).
Here is alsa-info in the 6ch mode:
http://www.alsa-project.org/db/?f=d152698d4b2d9589d4c5f14e0c8e6d4978c8fbd0
And in 8ch mode:
http://www.alsa-project.org/db/?f=4d5d14fbb559819fd82e7731e656be7efcfab439
Pulseaudio is not smart enough to decide by itself that it can toggle the control and add 7.1 profiles. If I toggle the control manually and restart pulseaudio, they appear.
If the role of the "Line jack" control is still unclear, just say so and tell me what to do to figure it out.
http://cgit.freedesktop.org/pulseaudio/pulseaudio/plain/src/modules/alsa/mix...
pulseaudio use "Line Jack" to determine whether line in is available or not
In 8ch mode, do the "Line jack" return true when you plugged "Side Speaker" ?
pactl list
should "line in" list as not available when channel mode changed to "8 ch" ?
Should changes in "channel mode" , "Headphone Mic jack mode" or "Mic Jack Mode" trigger an event so that pulseaudio server probe the sound card again ?
There is still bug in the patch
should check (cfg->line_out + spec->multi_ios) >= 3 instead of spec->multi_ios > 0 so that the channel mode is not added for notebook with line out and mic jack
2013/12/1 Raymond Yau superquad.vortex2@gmail.com:
Before retasking:
http://www.alsa-project.org/db/?f=fd97b8194e205b4f91127bca74ad7c9b2cd93ab9
After retasking blue line in, pin ID 0x1a as Line out (Side):
http://www.alsa-project.org/db/?f=d56f9a6d0692c9a8d5c88f43100a6cb78407c163
Note that retasking did not work: attempting to play a 8-channel wav file through hw:1,0 resulted in an "Invalid argument" error.
FWIW, here is what hdajackretask printed to the console:
0x11 0x99430130 0x12 0x4037c540 0x14 0x01014010 0x15 0x01011012 0x16 0x01016011 0x17 0x411111f0 0x18 0x01a19050 0x19 0x02a19060 0x1a 0x01014413 0x1b 0x02214020 0x1c 0x411111f0 0x1d 0x4045e601 0x1e 0x01452140 0x1f 0x411111f0 1
you need root privilege for hdajackretask to write the firmware file to /lib/firmware and modify /etc/modprobe.d/alsa-lbase.conf to use the firmware file
can you try the patch which add "channel mode" control which allow you to switch from 6ch to 8ch
I have tested the patch. In 8ch mode, it works without any overrides in the sense that the side channels go to the blue jack if I choose 8ch mode. In the 6ch mode, the line input also works (tested by using headphones as a very bad microphone-like source).
Here is alsa-info in the 6ch mode:
http://www.alsa-project.org/db/?f=d152698d4b2d9589d4c5f14e0c8e6d4978c8fbd0
And in 8ch mode:
http://www.alsa-project.org/db/?f=4d5d14fbb559819fd82e7731e656be7efcfab439
Pulseaudio is not smart enough to decide by itself that it can toggle the control and add 7.1 profiles. If I toggle the control manually and restart pulseaudio, they appear.
If the role of the "Line jack" control is still unclear, just say so and tell me what to do to figure it out.
I will test everything later today, when I return home. However, I have questions about the tests.
In 8ch mode, do the "Line jack" return true when you plugged "Side Speaker" ?
Do I understand correctly that I need to look at "amixer -c1 contents" output?
Should changes in "channel mode" , "Headphone Mic jack mode" or "Mic Jack Mode" trigger an event so that pulseaudio server probe the sound card again ?
How can I verify this? Is it enough to look at pulseaudio -vvv output?
can you try the patch which add "channel mode" control which allow you to switch from 6ch to 8ch
I have tested the patch. In 8ch mode, it works without any overrides in the sense that the side channels go to the blue jack if I choose 8ch mode. In the 6ch mode, the line input also works (tested by using headphones as a very bad microphone-like source).
Here is alsa-info in the 6ch mode:
http://www.alsa-project.org/db/?f=d152698d4b2d9589d4c5f14e0c8e6d4978c8fbd0
And in 8ch mode:
http://www.alsa-project.org/db/?f=4d5d14fbb559819fd82e7731e656be7efcfab439
Pulseaudio is not smart enough to decide by itself that it can toggle the control and add 7.1 profiles. If I toggle the control manually and restart pulseaudio, they appear.
If the role of the "Line jack" control is still unclear, just say so and tell me what to do to figure it out.
I will test everything later today, when I return home. However, I have questions about the tests.
In 8ch mode, do the "Line jack" return true when you plugged "Side
Speaker"
?
Do I understand correctly that I need to look at "amixer -c1 contents" output?
Should changes in "channel mode" , "Headphone Mic jack mode" or "Mic Jack Mode" trigger an event so that pulseaudio server probe the sound card
again
?
How can I verify this? Is it enough to look at pulseaudio -vvv output?
if your computer chassis does not have front audio panel and you want to use headphone with line out jacks the rear panel
just use early patching to add hints
add_out_jack_modes=1
or
add the following line to patch_realtek.c
spec->gen.add_jack_modes = 1
this create "Line Out Jack Mode" control on those line out jacks and "Headphone Jack Mode" on headphone jacks which pincap support OUT and HP,
your headphone plugged into Line Out jack still be regarded as Line Out and use Front Playback Volume
http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/mi...
http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixe...
as add_out_jack_modes is depreciated , you will have "Front Mic Jack Mode" , "Rear Mic Jack Mode" and "Line Jack Mode" controls
The function of these kind of controls are to change the function of the corresponding jacks
the function of the "channel mode" control have one more function in addition to change the input jacks to surround output jacks ,is to change playback mode from stereo to support multi-channels playback
however "channel mode" change to "8ch" does not imply "Line in" jack must be retasked (e.g. both rear mic and line in are retaskable)
for those 3stack desktop Line In is retasked as output but for those 5 stack desktop , Line In is still input jacks when "channel mode" is "6ch"
the possible way is to check the pin ctls and vref of the node is match with the name of the jack detection control, also the driver might set pin ctl to zero to mute the output
Node 0x1a [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out Control: name="Side Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Line Boost Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Control: name="Line Jack", index=0, device=0 Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x03 0x03] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x00003736: IN OUT Detect Trigger Vref caps: HIZ 50 GRD 80 100 Pin Default 0x0181305f: [Jack] Line In at Ext Rear Conn = 1/8, Color = Blue DefAssociation = 0x5, Sequence = 0xf Pin-ctls: 0x40: OUT VREF_HIZ Unsolicited: tag=04, enabled=1 Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Connection: 5 0x0c 0x0d 0x0e 0x0f* 0x26
2013/12/1 Raymond Yau superquad.vortex2@gmail.com:
There is still bug in the patch
should check (cfg->line_out + spec->multi_ios) >= 3 instead of spec->multi_ios > 0 so that the channel mode is not added for notebook with line out and mic jack
I assume you are talking about the part that applies to create_multi_out_ctls(). In that case, NAK - the change leads to non-creation of the 6ch / 8ch "channel mode" control on my board.
2013/12/1 Raymond Yau superquad.vortex2@gmail.com:
All tests below were done with the original patch, as the suggested modification breaks 8ch mode here.
In 8ch mode, do the "Line jack" return true when you plugged "Side Speaker" ?
Yes, the state reflects whether something is plugged into the blue jack.
pactl list
should "line in" list as not available when channel mode changed to "8 ch" ?
Unfortunately, it is "available" if there is something plugged in and "mot available" if there is nothing plugged in.
Should changes in "channel mode" , "Headphone Mic jack mode" or "Mic Jack Mode" trigger an event so that pulseaudio server probe the sound card again ?
Changes in "channel mode" do not trigger anything that pulseaudio -vvv considers loggable. Changes from 8ch to 6ch do not cause the 7.1 profiles to disappear.
The device has no controls that contain "mic jack mode" as a substring and are controllable via alsamixer.
All tests below were done with the original patch, as the suggested modification breaks 8ch mode here.
In 8ch mode, do the "Line jack" return true when you plugged "Side
Speaker"
?
Yes, the state reflects whether something is plugged into the blue jack.
pactl list
should "line in" list as not available when channel mode changed to "8
ch" ?
Unfortunately, it is "available" if there is something plugged in and "mot available" if there is nothing plugged in.
https://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Controls.txt
Mic Jack Mode, Line Jack Mode, etc These enum controls the direction and the bias of the input jack pins. Depending on the jack type, it can set as "Mic In" and "Line In", for determining the input bias, or it can be set to "Line Out" when the pin is a multi-I/O jack for surround channels.
the switching from 6ch to 8ch can also be implemented using Line Jack Mode too
Simple mixer control 'Line Jack Mode',0 Items: 'Mic In' 'Line In' 'Side Line Out' Item0: 'Side Line Out'
participants (2)
-
Alexander E. Patrakov
-
Raymond Yau