]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Use regmap for amp accesses
authorTakashi Iwai <tiwai@suse.de>
Wed, 25 Feb 2015 14:18:50 +0000 (15:18 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Mar 2015 12:19:39 +0000 (13:19 +0100)
commit4d4bde78e8894540ed4d69898594eedc59248bcc
tree8a664234ab300d8275d9d1acc604f52b5c7d0270
parentac4bcfd21b048e3ede8f1b0b07f272e7cda95abc
ALSA: hda - Use regmap for amp accesses

This patch converts the amp access functions to the regmap helpers.
The amp values were formerly cached in the own hash table.  Now it's
dropped by the regmap's cache.

The only tricky conversion is snd_hda_codec_amp_init().  This function
shouldn't do anything if the amp was already initialized.  For
achieving this behavior, a value is read once at first temporarily in
the cache-only mode.  Only if it returns an error,  i.e. the item
still doesn't exist in the cache, it proceeds to the update.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_local.h
sound/pci/hda/patch_hdmi.c
sound/pci/hda/patch_realtek.c