diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-11-25 09:57:27 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-11-25 09:57:27 +0100 |
commit | d1c9a38291a3b77627b6c4bfb980142c9fba3521 (patch) | |
tree | 48cd02de009c45fc06eb53b39b6d75e9cc8cc60d | |
parent | 8b184c637acd2fc647a52e4198244cf85669eab4 (diff) | |
download | hda-emu-d1c9a38291a3b77627b6c4bfb980142c9fba3521.tar.gz |
Allow to pass a direct hint via -H option
If a string with '=' is passed to -H option, hda-emu parses the value
and handles as a hint string directly.
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | hda-emu.c | 9 |
2 files changed, 11 insertions, 1 deletions
@@ -423,7 +423,8 @@ register and pin-config value in each line just like in *_pin_configs sysfs files. Similarly, you can give the initial hints strings either from sysfs -file in alsa-info.sh output or an external file via -H option. +file in alsa-info.sh output or an external file via -H option. Also, +you can pass a hint directrly via -H option, e.g. -H "jack_detect=0". If you want to debug a certain jack-plug state at the initial time, pass the pin NID to turn on via -j option. When nothing is set, all @@ -1146,6 +1146,15 @@ static int load_init_hints(struct xhda_codec *codec, char *hints) char buf[256]; struct xhda_sysfs_list *sys; + if (strchr(hints, '=')) { + /* direct hint string */ + if (_parse_hints(_codec, hints)) { + hda_log(HDA_LOG_ERR, "Invalid hints %s\n", hints); + return -EINVAL; + } + return 0; + } + for (sys = codec->sysfs_list; sys; sys = sys->next) { if (sys->type == XHDA_SYS_HINTS && !strcmp(sys->id, hints)) { |