[alsa-devel] Intel HDA Driver - Bug
Hi,
I have been trying to get the sound on my Dell Inspiron 1720 laptop running under Debian Etch (STAC 9205). Originally, I could only get sound through the main speakers, there was no headphone sound or mic.
I downloaded the latest alsa-drivers package (1.0.14), compiled it and installed it. I received the following messages (and the device would not register itself):
hda_intel: azx_get_response timeout, switching to polling mode... hda_intel: azx_get_response timeout, switching to single_cmd mode...
I started digging into the driver code and found an issue with one of the routines going outside an array.
The offending code is (all in patch_sigmatel): static void stac92xx_set_config_regs(struct hda_codec *codec) { // ... for (i = 0; i < spec->num_pins; i++) { // ... }
And in: static int patch_stac9205(struct hda_codec *codec) { // .. spec->num_pins = 14 ; //ERROR // .. }
However, there are only 12 pins with 12 corresponding NIDs and default configuration so in stac92xx_set_config_regs it accesses spec->pin_configs[i] and spec->pin_nids[i] outside of bounds.
Fix: Add a define (STAC_9205_MAX_PINS = 12) and use for array defines and num_pins.
The driver loads now, but I still only have sound out the main speaker. If I get rid of the configuration sent to the chipset altogether. I get sound through Headphone and Speakers (with detect working on HP), but still no MIC.
How can I add support for my Dell as I don't know the configuration to use or am I missing something here?
Thanks,
Steve
At Thu, 26 Jul 2007 16:32:00 +0100, Steven King wrote:
Hi,
I have been trying to get the sound on my Dell Inspiron 1720 laptop running under Debian Etch (STAC 9205). Originally, I could only get sound through the main speakers, there was no headphone sound or mic.
I downloaded the latest alsa-drivers package (1.0.14), compiled it and installed it. I received the following messages (and the device would not register itself):
hda_intel: azx_get_response timeout, switching to polling mode... hda_intel: azx_get_response timeout, switching to single_cmd mode...
I started digging into the driver code and found an issue with one of the routines going outside an array.
The offending code is (all in patch_sigmatel): static void stac92xx_set_config_regs(struct hda_codec *codec) { // ... for (i = 0; i < spec->num_pins; i++) { // ... }
And in: static int patch_stac9205(struct hda_codec *codec) { // .. spec->num_pins = 14 ; //ERROR // .. }
However, there are only 12 pins with 12 corresponding NIDs and default configuration so in stac92xx_set_config_regs it accesses spec->pin_configs[i] and spec->pin_nids[i] outside of bounds.
Fix: Add a define (STAC_9205_MAX_PINS = 12) and use for array defines and num_pins.
It's a known problem and was fixed on HG repo weeks ago.
BTW, it seems that hg-mirror.alsa-project.org is out of sync. Try hg.alsa-project.org instead.
thanks,
Takashi
Hi Takashi,
I have grabbed the source tree: hg clone http://hg.alsa-project.org/alsa-kernel, hg clone http://hg.alsa-project.org/alsa-driver
I compiled the module and reloaded it. The main speaker and headphones work (with HP jack detect), however the mic is still not working (a mic jack). In alsamixer I get: ADCMux, InMux and InVol, I turned these all up to full and tried using gnome-sound-recorder to record sound, no luck. With Digital Input Source ->
What can I do to work out the correct input device? I think that no mic input is detected during autoconfiguration.
Thanks for your help,
Steve
On 7/26/07, Takashi Iwai tiwai@suse.de wrote:
At Thu, 26 Jul 2007 16:32:00 +0100, Steven King wrote:
Hi,
I have been trying to get the sound on my Dell Inspiron 1720 laptop running under Debian Etch (STAC 9205). Originally, I could only get sound through the main speakers, there was no headphone sound or mic.
I downloaded the latest alsa-drivers package (1.0.14), compiled it and installed it. I received the following messages (and the device would not register itself):
hda_intel: azx_get_response timeout, switching to polling mode... hda_intel: azx_get_response timeout, switching to single_cmd mode...
I started digging into the driver code and found an issue with one of the routines going outside an array.
The offending code is (all in patch_sigmatel): static void stac92xx_set_config_regs(struct hda_codec *codec) { // ... for (i = 0; i < spec->num_pins; i++) { // ... }
And in: static int patch_stac9205(struct hda_codec *codec) { // .. spec->num_pins = 14 ; //ERROR // .. }
However, there are only 12 pins with 12 corresponding NIDs and default configuration so in stac92xx_set_config_regs it accesses spec->pin_configs[i] and spec->pin_nids[i] outside of bounds.
Fix: Add a define (STAC_9205_MAX_PINS = 12) and use for array defines and num_pins.
It's a known problem and was fixed on HG repo weeks ago.
BTW, it seems that hg-mirror.alsa-project.org is out of sync. Try hg.alsa-project.org instead.
thanks,
Takashi
At Thu, 26 Jul 2007 18:14:03 +0100, Steven King wrote:
Hi Takashi,
I have grabbed the source tree: hg clone http://hg.alsa-project.org/alsa-kernel , hg clone http://hg.alsa-project.org/alsa-driver
I compiled the module and reloaded it. The main speaker and headphones work (with HP jack detect), however the mic is still not working (a mic jack). In alsamixer I get: ADCMux, InMux and InVol, I turned these all up to full and tried using gnome-sound-recorder to record sound, no luck. With Digital Input Source ->
What can I do to work out the correct input device? I think that no mic input is detected during autoconfiguration.
Well, I'm not sure whether the recording works on _all_ mac models there. It was confirmed to work at least on some models, but not on every model.
Anyway, let's sort out the possible mixer setting problem. Please attach the contents of /proc/asound/card0/codec#* (for audio codec) and the generated file via "alsactl -f somefile store" for further analysis.
Takashi
Hi Takashi,
See the attached files for the alsaconfig and card info. This is the first time I've looked into the drivers of ALSA, so please be patient :)
Thanks,
Steve
On 7/26/07, Takashi Iwai tiwai@suse.de wrote:
At Thu, 26 Jul 2007 18:14:03 +0100, Steven King wrote:
Hi Takashi,
I have grabbed the source tree: hg clone http://hg.alsa-project.org/alsa-kernel , hg clone http://hg.alsa-project.org/alsa-driver
I compiled the module and reloaded it. The main speaker and headphones work (with HP jack detect), however the mic is still not working (a mic jack). In alsamixer I get: ADCMux, InMux and InVol, I turned these all up to full and tried using gnome-sound-recorder to record sound, no luck. With Digital Input Source ->
What can I do to work out the correct input device? I think that no mic input is detected during autoconfiguration.
Well, I'm not sure whether the recording works on _all_ mac models there. It was confirmed to work at least on some models, but not on every model.
Anyway, let's sort out the possible mixer setting problem. Please attach the contents of /proc/asound/card0/codec#* (for audio codec) and the generated file via "alsactl -f somefile store" for further analysis.
Takashi
participants (2)
-
Steven King
-
Takashi Iwai