[ALSA] hda-codec - Allow model=generic always for generic parser
authorTakashi Iwai <tiwai@suse.de>
Mon, 26 Feb 2007 14:56:46 +0000 (15:56 +0100)
committerJaroslav Kysela <perex@suse.cz>
Fri, 11 May 2007 14:55:44 +0000 (16:55 +0200)
Accept model=generic option to specify the generic parser regardless
of codec chips.  This is helpful for testing and debugging.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Documentation/sound/alsa/ALSA-Configuration.txt
sound/pci/hda/hda_codec.c

index 24ea129969ae048810bf59472bea95d4d8da1c72..4d92a3e6952537157c5e9952e8d414b5d1e34cd6 100644 (file)
@@ -924,6 +924,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
          vaio          Setup for VAIO FE550G/SZ110
          vaio-ar Setup for VAIO AR
 
+    The model name "genric" is treated as a special case.  When this
+    model is given, the driver uses the generic codec parser without
+    "codec-patch".  It's sometimes good for testing and debugging.
+
     If the default configuration doesn't work and one of the above
     matches with your device, report it together with the PCI
     subsystem ID (output of "lspci -nv") to ALSA BTS or alsa-devel
index 8f34fb4479837087b177c6f0c15d6eeb29caf300..4c0a6a5b20d986bb4b832b2158e9209c247fdb97 100644 (file)
@@ -573,7 +573,8 @@ int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
                                                         0);
        }
 
-       codec->preset = find_codec_preset(codec);
+       if (strcmp(codec->bus->modelname, "generic"))
+               codec->preset = find_codec_preset(codec);
        if (! *bus->card->mixername)
                snd_hda_get_codec_name(codec, bus->card->mixername,
                                       sizeof(bus->card->mixername));