[alsa-devel] "modprobe snd_hda_intel" crashes on my hardware
Clemens Ladisch
clemens at ladisch.de
Tue Sep 27 15:18:38 CEST 2011
This looks like a patch, not like a crash report.
Please check linux/Documentation/SubmittingPatches.
Abdelghani Ouchabane wrote:
> + /* THis is added because Ezono sound card doesn't support auto detection */
"This"
_All_ VT1708 chips support autodetection; the registers just have to be
initialized correctly by the BIOS.
> + /* Port_A PW0 */
> + snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_CONFIG_DEFAULT_BYTES_0, 0x00);
> + snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_CONFIG_DEFAULT_BYTES_1, 0xf0);
> + snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_CONFIG_DEFAULT_BYTES_2, 0x00);
> + snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0x00);
> ...
A table of initialization values that gets written in a loop would look
less ugly.
> static int patch_vt1708(struct hda_codec *codec)
> {
> struct via_spec *spec;
> @@ -902,7 +945,10 @@ static int patch_vt1708(struct hda_codec
> return -ENOMEM;
>
> codec->spec = spec;
> -
> +
> + /* Init Ezono Sound card */
> + ezono_vt1708_init(codec);
> +
Please don't add whitespace to empty lines.
This initialization gets applied to _all_ VT1708 chips; thus it will
break all non-Ezono machines.
The driver has to check whether it is running on this particular model
of an Ezono computer. The correct way to do this is to check the PCI
IDs:
> 00:1b.0 0403: 8086:27d8
> ...
> Subsystem Id: 0xffffffff
Oh well, somebody forgot to initialize them. Probably the same BIOS
programmer that forgot to initialize the VT1708 registers.
Another way would be to check the DMI strings.
> Manufacturer:
> Product Name:
> Product Version:
Or not. Who wrote that BIOS? Somebody whose brain was damaged by too
much ultrasound?
Anyway, you could just override the pin configs with a HDA patch file.
Ensure that your kernel is compiled with CONFIG_SND_HDA_PATCH_LOADER;
then create a file /lib/firmware/forgotten-ezono-hda-settings with the
following contents:
[codec]
0x11061708 0xffffffff 2
[pincfg]
0x1c 0x0000f000
0x1d 0x00a0f040
0x1f 0x0100f010
0x20 0x0020f000
0x22 0x0000f002
0x23 0x0000f004
Then load the snd-hda-intel driver with the parameter
"patch=forgotten-ezono-hda-settings", either by adding that
parameter to the modprobe command line, or by putting the line
options snd-hda-intel patch=forgotten-ezono-hda-settings
into a .conf file in /etc/modprobe.d/.
Regards,
Clemens
More information about the Alsa-devel
mailing list