aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-12-19 09:19:11 -0500
committerTakashi Iwai <tiwai@suse.de>2008-12-19 09:19:11 -0500
commitd4d9cd0338892e7f0d65f8a110473d175535cd5d (patch)
tree6bfc5b0f497f7a9e4ff7391e056a1656b05add68 /sound/pci/hda/hda_intel.c
parent03c6901ea22bbb532586334d5b79941ccf56d5b0 (diff)
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_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index a26ae8c4cf70..6613b6bef9eb 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -58,6 +58,7 @@ static char *model[SNDRV_CARDS];
58static int position_fix[SNDRV_CARDS]; 58static int position_fix[SNDRV_CARDS];
59static int bdl_pos_adj[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1}; 59static int bdl_pos_adj[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
60static int probe_mask[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1}; 60static int probe_mask[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
61static int probe_only[SNDRV_CARDS];
61static int single_cmd; 62static int single_cmd;
62static int enable_msi; 63static int enable_msi;
63 64
@@ -76,6 +77,8 @@ module_param_array(bdl_pos_adj, int, NULL, 0644);
76MODULE_PARM_DESC(bdl_pos_adj, "BDL position adjustment offset."); 77MODULE_PARM_DESC(bdl_pos_adj, "BDL position adjustment offset.");
77module_param_array(probe_mask, int, NULL, 0444); 78module_param_array(probe_mask, int, NULL, 0444);
78MODULE_PARM_DESC(probe_mask, "Bitmask to probe codecs (default = -1)."); 79MODULE_PARM_DESC(probe_mask, "Bitmask to probe codecs (default = -1).");
80module_param_array(probe_only, bool, NULL, 0444);
81MODULE_PARM_DESC(probe_only, "Only probing and no codec initialization.");
79module_param(single_cmd, bool, 0444); 82module_param(single_cmd, bool, 0444);
80MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs " 83MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs "
81 "(for debugging only)."); 84 "(for debugging only).");
@@ -1224,7 +1227,8 @@ static unsigned int azx_max_codecs[AZX_NUM_DRIVERS] __devinitdata = {
1224}; 1227};
1225 1228
1226static int __devinit azx_codec_create(struct azx *chip, const char *model, 1229static int __devinit azx_codec_create(struct azx *chip, const char *model,
1227 unsigned int codec_probe_mask) 1230 unsigned int codec_probe_mask,
1231 int no_init)
1228{ 1232{
1229 struct hda_bus_template bus_temp; 1233 struct hda_bus_template bus_temp;
1230 int c, codecs, err; 1234 int c, codecs, err;
@@ -1282,7 +1286,7 @@ static int __devinit azx_codec_create(struct azx *chip, const char *model,
1282 for (c = 0; c < max_slots; c++) { 1286 for (c = 0; c < max_slots; c++) {
1283 if ((chip->codec_mask & (1 << c)) & codec_probe_mask) { 1287 if ((chip->codec_mask & (1 << c)) & codec_probe_mask) {
1284 struct hda_codec *codec; 1288 struct hda_codec *codec;
1285 err = snd_hda_codec_new(chip->bus, c, &codec); 1289 err = snd_hda_codec_new(chip->bus, c, !no_init, &codec);
1286 if (err < 0) 1290 if (err < 0)
1287 continue; 1291 continue;
1288 codecs++; 1292 codecs++;
@@ -2340,7 +2344,8 @@ static int __devinit azx_probe(struct pci_dev *pci,
2340 card->private_data = chip; 2344 card->private_data = chip;
2341 2345
2342 /* create codec instances */ 2346 /* create codec instances */
2343 err = azx_codec_create(chip, model[dev], probe_mask[dev]); 2347 err = azx_codec_create(chip, model[dev], probe_mask[dev],
2348 probe_only[dev]);
2344 if (err < 0) 2349 if (err < 0)
2345 goto out_free; 2350 goto out_free;
2346 2351