Jack sense fails on Fujitsu p7120
I posted regarding this issue to alsa-users, but haven't had any response. I've come to the conclusion that I will have to modify the driver myself to rectify this problem, so I would appreciate some pointers as to how to get started with that.
Running Xubuntu 10.10 with Alsa 1.0.23
The sound chip is Intel HDA, ALC260. I have tried setting
options snd-hda-intel model=fujitsu
in /etc/modprobe.d/alsa-base.conf, but this hasn't made any difference. There is no "Jack Sense" option in alsamixer. I've also tried a couple of values for fix_position.
I've tried following the ubuntu wiki pages for Intel HDA and sound debugging in general, to no avail. When doing the jack sense test recommended on
https://wiki.ubuntu.com/ALSA/JackSense the two files generated with and without the headphones plugged in were identical. This makes me think it is a driver problem. I pasted the output of cat /proc/asound/card*/codec* at
http://pastebin.com/4NyvdsXf in case this is of any help.
Hi again,
I'm just wondering if this is the wrong venue for this question? If so please could someone direct me to a more appropriate place to ask?
Thanks
Quoted 16 lines · Robin Neatherway
I posted regarding this issue to alsa-users, but haven't had any response. I've come to the conclusion that I will have to modify the driver myself to rectify this problem, so I would appreciate some pointers as to how to get started with that.
Running Xubuntu 10.10 with Alsa 1.0.23
The sound chip is Intel HDA, ALC260. I have tried setting options snd-hda-intel model=fujitsu
in/etc/modprobe.d/alsa-base.conf, but this hasn't made any difference. There is no "Jack Sense" option in alsamixer. I've also tried a couple of values forfix_position.
I've tried following the ubuntu wiki pages for Intel HDA and sound debugging in general, to no avail. When doing the jack sense test recommended on
https://wiki.ubuntu.com/ALSA/JackSense the two files generated with and without the headphones plugged in were identical. This makes me think it is a driver problem. I pasted the output ofcat /proc/asound/card*/codec*at
http://pastebin.com/4NyvdsXf in case this is of any help.
2011/1/19 Robin Neatherway <[email protected]>
Quoted 7 lines
I posted regarding this issue to alsa-users, but haven't had any response. I've come to the conclusion that I will have to modify the driver myself to rectify this problem, so I would appreciate some pointers as to how to get started with that.
Running Xubuntu 10.10 with Alsa 1.0.23
Quoted 9 lines
The sound chip is Intel HDA, ALC260. I have tried setting
options snd-hda-intel model=fujitsu
in
/etc/modprobe.d/alsa-base.conf, but this hasn't made any difference. There is no "Jack Sense" option in alsamixer. I've also tried a couple of values forfix_position.
If you compiled the driver in debug mode, you can select model=test for alc260
http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=7cf51e48315d87b4c1cf600d611894f45f661142
Quoted 4 lines
If you compiled the driver in debug mode, you can select model=test for alc260
http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=7cf51e48315d87b4c1cf600d611894f45f661142
Thanks for the suggestion. I tried compiling both the stable versions and the latest snapshots. The result was that new modules appeared in /lib/modules/uname -r/updates/alsa, which I think is the idea. However, when trying to use these modules, I received
$ sudo modprobe snd-hda-intel FATAL: Error inserting snd_hda_intel (/lib/modules/2.6.35-24-generic/updates/alsa/pci/hda/snd-hda-intel.ko): Unknown symbol in module, or unknown parameter (see dmesg)
And dmesg contains the following:
syslog:Jan 23 16:47:03 baldur kernel: [ 23.389315] snd: Unknown
symbol unregister_sound_special (err 0)
syslog:Jan 23 16:47:03 baldur kernel: [ 23.390067] snd: Unknown
symbol register_sound_special_device (err 0)
After reinstalling the alsa and linux-sound packages for Ubuntu, I recovered sound, but I can't try the "test" parameter without being able to load the module.
Do you know what this error means?
Robin
2011/1/24 Robin Neatherway <[email protected]>
Quoted 22 lines
Quoted 4 lines
If you compiled the driver in debug mode, you can select model=test for alc260
http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=7cf51e48315d87b4c1cf600d611894f45f661142
Thanks for the suggestion. I tried compiling both the stable versions and the latest snapshots. The result was that new modules appeared in
/lib/modules/uname -r/updates/alsa, which I think is the idea. However, when trying to use these modules, I received$ sudo modprobe snd-hda-intel FATAL: Error inserting snd_hda_intel (/lib/modules/2.6.35-24-generic/updates/alsa/pci/hda/snd-hda-intel.ko): Unknown symbol in module, or unknown parameter (see dmesg)And dmesg contains the following:
syslog:Jan 23 16:47:03 baldur kernel: [ 23.389315] snd: Unknown
symbolunregister_sound_special(err 0)
syslog:Jan 23 16:47:03 baldur kernel: [ 23.390067] snd: Unknown
symbolregister_sound_special_device(err 0)
Quoted 6 lines
After reinstalling the alsa and linux-sound packages for Ubuntu, I recovered sound, but I can't try the "test" parameter without being able to load the module.
Do you know what this error means?
Because ubuntu had disabled OSS emulation , you have to disable OSS emulation too.
./configure --with-oss=no
Quoted 4 lines
Because ubuntu had disabled OSS emulation , you have to disable OSS emulation too.
./configure --with-oss=no
Thanks for the tip. I've compiled the 1.0.24 drivers tarball using ./configure --with-debug=full --with-oss=no and it now loads correctly. I have a large number of controls in alsamixer, having set model=test in /etc/modprobe.d/alsa-base.conf.
The control names are now generic, but I have found that LOUT1 is the headphones and LOUT2 is the speakers. There are also GPIO pins 0-3 available. I have tried toggling these, but it does not affect the jack sense, which still does not operate.
The new alsa-info is at the following URL:
http://www.alsa-project.org/db/?f=3fb1a67066b9d06ac8405685ff7358af053e2668
How should I proceed? I've looked at the pci/drivers/hda_intel.c, and I notice that several "quirk" modes are enabled for particular models. Is it sensible to try enumerating these on my laptop, or are tables like this:
SND_PCI_QUIRK(0x1025, 0x009f, "Acer Aspire 5110", POS_FIX_LPIB), SND_PCI_QUIRK(0x1025, 0x026f, "Acer Aspire 5538", POS_FIX_LPIB), SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB), SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB), SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
changing different addresses for each laptop model?
Thanks again for your help so far.
2011/2/1 Robin Neatherway <[email protected]>
Quoted 10 lines
Quoted 4 lines
Because ubuntu had disabled OSS emulation , you have to disable OSS emulation too.
./configure --with-oss=no
Thanks for the tip. I've compiled the 1.0.24 drivers tarball using ./configure --with-debug=full --with-oss=no and it now loads correctly. I have a large number of controls in alsamixer, having set model=test in
/etc/modprobe.d/alsa-base.conf.
Quoted 8 lines
The control names are now generic, but I have found that LOUT1 is the headphones and LOUT2 is the speakers. There are also GPIO pins 0-3 available. I have tried toggling these, but it does not affect the jack sense, which still does not operate.
The new alsa-info is at the following URL:
http://www.alsa-project.org/db/?f=3fb1a67066b9d06ac8405685ff7358af053e2668
Do you mean
LOUT1 playback volume control at node 0x8 affect the volume of your headphone and LOUT2 playback volume control at node 0x9 affect the volume of your speakers ?
If you look at 4.1 Block Diagram of alc260 datasheet ,
LOUT1 is connected to 0xf Line Out and
LOUT2 is connected to 0x10 HP
Quoted 10 lines
Do you mean
LOUT1 playback volume control at node
0x8affect the volume of your headphone and LOUT2 playback volume control at node0x9affect the volume of your speakers ?If you look at 4.1 Block Diagram of alc260 datasheet ,
LOUT1 is connected to
0xfLine Out and
LOUT2 is connected to0x10HP
Having looked at the datasheet I agree with you, this seems surprising. However, if I run speaker-test and then toggle the mutes of LOUT1 and LOUT2 one by one, they toggle the headphones and speakers respectively.
Additionally, to hear output on each device I have to set the following pin modes:
Headphones: LINE1 pin mode at node 0x14 must be set to line out (quieter)/headphones (louder)
Speakers: HP-OUT pin mode at node 0x10 must be set to line out/headphones (same volume)
This bears little relationship to the datasheet.
Quoted 1 line
From the datasheet it looks like:
Node 0x1b [Volume Knob Widget] wcaps 0x600080: Mono
Volume-Knob: delta=0, steps=64, direct=0, val=48
Unsolicited: tag=00, enabled=0
Connection: 0
should be responsible for the jack detection. I have noticed in my testing that the "val" is sometimes 48 and sometimes 49, but I haven't been able to correlate this with presence of headphones or otherwise.
2011/2/2 Robin Neatherway <[email protected]>
Quoted 17 lines
Quoted 4 lines
Do you mean
LOUT1 playback volume control at node
0x8affect the volume of your headphone and LOUT2 playback volume control at node0x9affect the volumeof
Quoted 6 lines
your speakers ?
If you look at 4.1 Block Diagram of alc260 datasheet ,
LOUT1 is connected to
0xfLine Out and
LOUT2 is connected to0x10HPHaving looked at the datasheet I agree with you, this seems surprising. However, if I run speaker-test and then toggle the mutes of LOUT1 and LOUT2 one by one, they toggle the headphones and speakers respectively.
Quoted 9 lines
Additionally, to hear output on each device I have to set the following pin modes:
Headphones: LINE1 pin mode at node
0x14must be set to line out (quieter)/headphones (louder)
Speakers: HP-OUT pin mode at node0x10must be set to line out/headphones (same volume)
hp_automute work only when it get the correct position of HP and speaker [Pin complex]
Can you post the output of alsa-info.sh using model=auto after a cold boot to find out whether BIOS setup pin default of node 0x0f and 0x10 to HP and Speakers ?
if not, you will need to find any alc269 model which create "Headphone Playback Volume" at node 0x8 and "Speaker Playback volume" at node 0x09
At Wed, 2 Feb 2011 11:14:19 +0800,
Quoted 32 lines · Raymond Yau
2011/2/2 Robin Neatherway <[email protected]>
Quoted 17 lines
Quoted 4 lines
Do you mean
LOUT1 playback volume control at node
0x8affect the volume of your headphone and LOUT2 playback volume control at node0x9affect the volumeof
Quoted 6 lines
your speakers ?
If you look at 4.1 Block Diagram of alc260 datasheet ,
LOUT1 is connected to
0xfLine Out and
LOUT2 is connected to0x10HPHaving looked at the datasheet I agree with you, this seems surprising. However, if I run speaker-test and then toggle the mutes of LOUT1 and LOUT2 one by one, they toggle the headphones and speakers respectively.
Quoted 9 lines
Additionally, to hear output on each device I have to set the following pin modes:
Headphones: LINE1 pin mode at node
0x14must be set to line out (quieter)/headphones (louder)
Speakers: HP-OUT pin mode at node0x10must be set to line out/headphones (same volume)
hp_automutework only when it get the correct position of HP and speaker [Pin complex]
Quoted 6 lines
Can you post the output of
alsa-info.shusing model=auto after a cold boot to find out whether BIOS setup pin default of node0x0fand0x10to HP and Speakers ?if not, you will need to find any alc269 model which create "Headphone Playback Volume" at node
0x8and "Speaker Playback volume" at node0x09
Or set up the pins dynamically via sysfs and reconfigure. If you find out a working setup, it can be initialized automatically via patch option of snd-hda-intel module.
More details are found in HD-Audio.txt.
Takashi
Quoted 9 lines
Quoted 9 lines
hp_automutework only when it get the correct position of HP and speaker [Pin complex]Can you post the output of
alsa-info.shusing model=auto after a cold boot to find out whether BIOS setup pin default of node0x0fand0x10to HP and Speakers ?if not, you will need to find any alc269 model which create "Headphone Playback Volume" at node
0x8and "Speaker Playback volume" at node0x09
OK, this produced some interesting behaviour, new alsa info at:
http://www.alsa-project.org/db/?f=bdb19d75e4147d3ee294f2150db8b723e3ad3527
Headphone volume appears at node 0x8 and speakers at 0x9, however there is no sound over the speakers now, possibly related to this dmesg output:
[ 25.417568] ALSA hda_codec.c:4633: autoconfig: line_outs=2 (0x10/0x15/0x0/0x0/0x0) [ 25.417575] ALSA hda_codec.c:4637: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) [ 25.417581] ALSA hda_codec.c:4641: hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
Quoted 5 lines
Or set up the pins dynamically via sysfs and reconfigure. If you find out a working setup, it can be initialized automatically via patch option of snd-hda-intel module.
More details are found in HD-Audio.txt.
I've had a read through HD-Audio.txt and a quick look at the HD audio spec from Intel. It isn't clear to me how the pin configs relate to the way things are set up. The /sys/class/sound/hwC0D0/init_pin_configs file looks like this:
0x0f 0x411111f00x10 0xb70311100x11 0x411111f00x12 0x02a118200x13 0xb78311210x14 0x0221101f0x15 0x210110100x16 0x411111f00x17 0xb79311220x18 0x2145111e0x19 0x411111f0
Does each of the hex values on the left refer to a node? If so, where are those before 0xf and after 0x19?
Thanks,
Robin
At Wed, 2 Feb 2011 23:38:19 +0000,
Quoted 46 lines · Robin Neatherway
Quoted 10 lines
Quoted 10 lines
hp_automutework only when it get the correct position of HP and speaker [Pin complex]Can you post the output of
alsa-info.shusing model=auto after a cold boot to find out whether BIOS setup pin default of node0x0fand0x10to HP and Speakers ?if not, you will need to find any alc269 model which create "Headphone Playback Volume" at node
0x8and "Speaker Playback volume" at node0x09OK, this produced some interesting behaviour, new alsa info at:
http://www.alsa-project.org/db/?f=bdb19d75e4147d3ee294f2150db8b723e3ad3527Headphone volume appears at node
0x8and speakers at0x9, however there is no sound over the speakers now, possibly related to this dmesg output:[ 25.417568] ALSA hda_codec.c:4633: autoconfig: line_outs=2 (0x10/0x15/0x0/0x0/0x0) [ 25.417575] ALSA hda_codec.c:4637: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) [ 25.417581] ALSA hda_codec.c:4641: hp_outs=1 (0x14/0x0/0x0/0x0/0x0)Quoted 5 lines
Or set up the pins dynamically via sysfs and reconfigure. If you find out a working setup, it can be initialized automatically via patch option of snd-hda-intel module.
More details are found in HD-Audio.txt.
I've had a read through HD-Audio.txt and a quick look at the HD audio spec from Intel. It isn't clear to me how the pin configs relate to the way things are set up. The
/sys/class/sound/hwC0D0/init_pin_configsfile looks like this:
0x0f0x411111f00x100xb70311100x110x411111f00x120x02a118200x130xb78311210x140x0221101f0x150x210110100x160x411111f00x170xb79311220x180x2145111e0x190x411111f0
Quoted 1 line
Does each of the hex values on the left refer to a node?
Yes.
Quoted 2 lines
If so, where
are those before0xfand after0x19?
Others are no pin widgets. See HD-audio specification for more details.
Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 2 lines
if not, you will need to find any alc269 model which create "Headphone Playback Volume" at node
0x8and "Speaker Playback volume" at node0x09
With model=auto, these appear at the correct nodes, but I no longer get any sound over the speakers. How can I control where these appear, or add an EAPD pin to try and reenable the speakers?
Quoted 1 line
Others are no pin widgets. See HD-audio specification for more details.
OK, I've found "7.3.3.31 Configuration Default" in the spec which describes the meaning of the pin config register. From the discussion so far I think I need to change node 0x1B to be a jack sense pin. I must misunderstand though because a) Configuration Default has nothing to do with whether it is a jack sense pin and b) 0x1B is not a pin widget anyway.
At Thu, 3 Feb 2011 23:49:55 +0000,
Quoted 8 lines · Robin Neatherway
Quoted 3 lines
if not, you will need to find any alc269 model which create "Headphone Playback Volume" at node
0x8and "Speaker Playback volume" at node0x09With model=auto, these appear at the correct nodes, but I no longer get any sound over the speakers. How can I control where these appear, or add an EAPD pin to try and reenable the speakers?
Quoted 8 lines
Quoted 1 line
Others are no pin widgets. See HD-audio specification for more details.
OK, I've found "7.3.3.31 Configuration Default" in the spec which describes the meaning of the pin config register. From the discussion so far I think I need to change node
0x1Bto be a jack sense pin. I must misunderstand though because a) Configuration Default has nothing to do with whether it is a jack sense pin and b)0x1Bis not a pin widget anyway.
The auto codec parser reads the default config values of all pin widgets, and enables the jack sense when a pin is a HP jack. That's why it's important to figure out which pin widget corresponds to which actual I/O.
Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 4 lines
The auto codec parser reads the default config values of all pin widgets, and enables the jack sense when a pin is a HP jack. That's why it's important to figure out which pin widget corresponds to which actual I/O.
Right. With "auto", the jack sense might well be working then, but I can't tell because there is no output over the speakers. Unless there is another way of telling?
I'm pretty confused right now. Raymond suggested that the important thing is to ensure that the nodes 0x8 and 0x9 are HP and Speaker volume respectively, while you are suggesting that I should alter the pin configuration, which only affects pin widgets and these are only from 0xF to 0x19. The pin configuration doesn't seem to contain anything to do with jack sense, so I'm not sure what I should change there.
How do you normally figure out which pin widget corresponds to which I/O? Is it just trial and error?
The ALC260 datasheet (http://realtek.info/pdf/alc260.pdf section 4.1, page 4) seems to make it pretty clear that the jack sense is at node 0x1b, and the block diagram indicates that it is a pin, so why is it not showing up as a pin widget?
Thanks,
Robin
2011/2/4 Robin Neatherway <[email protected]>
Quoted 7 lines
Quoted 2 lines
if not, you will need to find any alc269 model which create "Headphone Playback Volume" at node
0x8and "Speaker Playback volume" at node0x09With model=auto, these appear at the correct nodes, but I no longer get any sound over the speakers. How can I control where these appear, or add an EAPD pin to try and reenable the speakers?
If you look at the datasheet LOUT1 and LOUT2 can be connected to 0xf, 0x10, 0x12 , 0x13, 0x14 and 0x15
So you have to find out which pin complex is your speaker by mute/unmute the mute switch of those pin complex