summaryrefslogtreecommitdiffstats
path: root/sound/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-26 14:18:34 +0100
committerTakashi Iwai <tiwai@suse.de>2015-03-26 14:18:34 +0100
commit8bc174e9e3079b2475fb09e244f71fd57de7a802 (patch)
tree2c2bf1eadf650635e250e77670b70e7fa234202d /sound/hda
parent40ba66a702b83f46c53456eaaac692fc12f82cb0 (diff)
downloadlinux-8bc174e9e3079b2475fb09e244f71fd57de7a802.tar.gz
linux-8bc174e9e3079b2475fb09e244f71fd57de7a802.tar.bz2
linux-8bc174e9e3079b2475fb09e244f71fd57de7a802.zip
ALSA: hda - Handle a few verbs as read-only
Although they can be written, handle a few verbs as read-only in regmap interface: CONFIG_DEFAULT, CONV and CVT_CHAN_COUNT. These are either updated in PCM or HDMI management code in a volatile manner, or just needed only as parameter, thus they don't need to be written at resume sync. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/hdac_regmap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/hda/hdac_regmap.c b/sound/hda/hdac_regmap.c
index e1dcf104d273..d401e5c69fe3 100644
--- a/sound/hda/hdac_regmap.c
+++ b/sound/hda/hdac_regmap.c
@@ -88,7 +88,6 @@ static bool hda_writeable_reg(struct device *dev, unsigned int reg)
switch (verb) {
case AC_VERB_GET_CONNECT_SEL:
case AC_VERB_GET_SDI_SELECT:
- case AC_VERB_GET_CONV:
case AC_VERB_GET_PIN_WIDGET_CONTROL:
case AC_VERB_GET_UNSOLICITED_RESPONSE: /* only as SET_UNSOLICITED_ENABLE */
case AC_VERB_GET_BEEP_CONTROL:
@@ -96,14 +95,12 @@ static bool hda_writeable_reg(struct device *dev, unsigned int reg)
case AC_VERB_GET_DIGI_CONVERT_1:
case AC_VERB_GET_DIGI_CONVERT_2: /* only for beep control */
case AC_VERB_GET_VOLUME_KNOB_CONTROL:
- case AC_VERB_GET_CONFIG_DEFAULT:
case AC_VERB_GET_GPIO_MASK:
case AC_VERB_GET_GPIO_DIRECTION:
case AC_VERB_GET_GPIO_DATA: /* not for volatile read */
case AC_VERB_GET_GPIO_WAKE_MASK:
case AC_VERB_GET_GPIO_UNSOLICITED_RSP_MASK:
case AC_VERB_GET_GPIO_STICKY_MASK:
- case AC_VERB_GET_CVT_CHAN_COUNT:
return true;
}
@@ -123,6 +120,13 @@ static bool hda_readable_reg(struct device *dev, unsigned int reg)
case AC_VERB_GET_CONNECT_LIST:
case AC_VERB_GET_SUBSYSTEM_ID:
return true;
+ /* below are basically writable, but disabled for reducing unnecessary
+ * writes at sync
+ */
+ case AC_VERB_GET_CONFIG_DEFAULT: /* usually just read */
+ case AC_VERB_GET_CONV: /* managed in PCM code */
+ case AC_VERB_GET_CVT_CHAN_COUNT: /* managed in HDMI CA code */
+ return true;
}
return hda_writeable_reg(dev, reg);