diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-01-23 12:56:05 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-23 12:56:05 +0100 |
commit | b1a30c35276447304bcb521717b132b6fff0a698 (patch) | |
tree | 3d9ff1909eadc893be39e56e9b31e9e9114be53a | |
parent | 85559967d8a51734d60ba363583257efffcf4195 (diff) | |
download | hda-emu-b1a30c35276447304bcb521717b132b6fff0a698.tar.gz |
Add -n option to start without invocation of codec parser
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | README | 12 | ||||
-rw-r--r-- | hda-emu.c | 24 |
2 files changed, 28 insertions, 8 deletions
@@ -430,6 +430,18 @@ pass the pin NID to turn on via -j option. When nothing is set, all pins are assumed to be unplugged at the start up. +START WITHOUT CODEC PARSER +-------------------------- + +When you don't want to start the codec parser procedure, i.e. just +probe the codec and initializes the instance without invoking the +parser, pass -n option. (This corresponds to probe_only=1 option for +snd-hda-intel module.) + +Then you can inspect the pin config, add hints or whatever, then +trigger the codec parser manually later by "fs set reconfig 1" command. + + DEBUGGING DRIVER WITH GDB ------------------------- @@ -1099,6 +1099,7 @@ static void usage(void) fprintf(stderr, " -M no color print\n"); fprintf(stderr, " -F print prefixes to messages\n"); fprintf(stderr, " -a issues SIGTRAP at codec errors\n"); + fprintf(stderr, " -n don't configure codec at start\n"); fprintf(stderr, " -P pincfg initialize pin-configuration from sysfs entry\n"); fprintf(stderr, " -H hints add initial hints from sysfs entry or file\n"); fprintf(stderr, " -j NID turn on the initial jack-state of the given pin\n"); @@ -1146,9 +1147,10 @@ int main(int argc, char **argv) char *init_pincfg = NULL; char *init_hints = NULL; int num_active_jacks = 0; + int no_configure = 0; unsigned int active_jacks[16]; - while ((c = getopt(argc, argv, "al:i:p:m:do:qCMFP:H:j:")) != -1) { + while ((c = getopt(argc, argv, "al:i:p:m:do:qCMFP:H:j:n")) != -1) { switch (c) { case 'a': hda_log_trap_on_error = 1; @@ -1198,6 +1200,9 @@ int main(int argc, char **argv) active_jacks[num_active_jacks++] = strtoul(optarg, NULL, 0); break; + case 'n': + no_configure = 1; + break; default: usage(); return 1; @@ -1321,21 +1326,24 @@ int main(int argc, char **argv) } #ifdef HAVE_HDA_PATCH_LOADER - snd_hda_codec_configure(codec); + if (!no_configure) + snd_hda_codec_configure(codec); #endif - hda_log(HDA_LOG_INFO, "# Building PCMs...\n"); - snd_hda_build_pcms(bus); + if (!no_configure) { + hda_log(HDA_LOG_INFO, "# Building PCMs...\n"); + snd_hda_build_pcms(bus); #ifndef HAVE_HDA_ATTACH_PCM - azx_pcm_create(codec); + azx_pcm_create(codec); #endif - hda_log(HDA_LOG_INFO, "# Init and building controls...\n"); + hda_log(HDA_LOG_INFO, "# Init and building controls...\n"); #ifdef CONFIG_SND_HDA_RECONFIG - snd_hda_codec_build_controls(codec); + snd_hda_codec_build_controls(codec); #else - snd_hda_build_controls(codec->bus); + snd_hda_build_controls(codec->bus); #endif + } /* power-down after init phase */ snd_hda_power_down(codec); |