diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-12-19 17:19:11 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-12-19 17:19:11 +0300 |
commit | d4d9cd0338892e7f0d65f8a110473d175535cd5d (patch) | |
tree | 6bfc5b0f497f7a9e4ff7391e056a1656b05add68 /sound/pci/hda/hda_codec.c | |
parent | 03c6901ea22bbb532586334d5b79941ccf56d5b0 (diff) | |
download | linux-d4d9cd0338892e7f0d65f8a110473d175535cd5d.tar.xz |
ALSA: hda - Add probe_only option
Added probe_only module option to hd-audio driver.
This option specifies whether the driver creates and initializes the
codec-parser after probing. When this option is set, the driver skips
the codec parsing and initialization but gives you proc and other
accesses. It's useful to see the initial codec state for debugging.
The default of this value is off, so the default behavior is as same
as before.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 625fe5984dd6..e16cf63821ae 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -709,7 +709,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) * Returns 0 if successful, or a negative error code. */ int /*__devinit*/ snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr, - struct hda_codec **codecp) + int do_init, struct hda_codec **codecp) { struct hda_codec *codec; char component[31]; @@ -793,10 +793,12 @@ int /*__devinit*/ snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr if (bus->modelname) codec->modelname = kstrdup(bus->modelname, GFP_KERNEL); - err = snd_hda_codec_configure(codec); - if (err < 0) { - snd_hda_codec_free(codec); - return err; + if (do_init) { + err = snd_hda_codec_configure(codec); + if (err < 0) { + snd_hda_codec_free(codec); + return err; + } } snd_hda_codec_proc_new(codec); |