aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_si3054.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-26 12:34:49 +0100
committerTakashi Iwai <tiwai@suse.de>2015-03-23 13:19:41 +0100
commita551d91473e5e3a591f6fe86ac5a5fb460c3f96a (patch)
tree575e8ddcf88929d8fa8b50a9e32bec147f4f5820 /sound/pci/hda/patch_si3054.c
parentALSA: hda - Allow driver to add vendor-specific verbs for regmap (diff)
downloadlinux-dev-a551d91473e5e3a591f6fe86ac5a5fb460c3f96a.tar.xz
linux-dev-a551d91473e5e3a591f6fe86ac5a5fb460c3f96a.zip
ALSA: hda - Use regmap for command verb caches, too
Like the previous patches, this patch converts also to the regmap, at this time, the cached verb writes are the target. But this conversion needs a bit more caution than before. - In the old code, we just record any verbs as is, and restore them at resume. For the regmap scheme, this doesn't work, since a few verbs like AMP or DIGI_CONVERT are asymmetrical. Such verbs are converted either to the dedicated function (snd_hda_regmap_xxx_amp()) or changed to the unified verb. - Some verbs have to be declared as vendor-specific ones before accessing via regmap. Also, the minor optimization with codec->cached_write flag is dropped in a few places, as this would confuse the operation. Further optimizations will be brought in the later patches, if any. This conversion ends up with a drop of significant amount of codes, mostly the helper codes that are no longer used. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_si3054.c')
-rw-r--r--sound/pci/hda/patch_si3054.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_si3054.c b/sound/pci/hda/patch_si3054.c
index 49b4868797a5..5104bebb2286 100644
--- a/sound/pci/hda/patch_si3054.c
+++ b/sound/pci/hda/patch_si3054.c
@@ -222,6 +222,10 @@ static int si3054_init(struct hda_codec *codec)
unsigned wait_count;
u16 val;
+ if (snd_hdac_regmap_add_vendor_verb(&codec->core,
+ SI3054_VERB_WRITE_NODE))
+ return -ENOMEM;
+
snd_hda_codec_write(codec, AC_NODE_ROOT, 0, AC_VERB_SET_CODEC_RESET, 0);
snd_hda_codec_write(codec, codec->core.mfg, 0, AC_VERB_SET_STREAM_FORMAT, 0);
SET_REG(codec, SI3054_LINE_RATE, 9600);