aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-06-10 10:27:00 +0200
committerTakashi Iwai <tiwai@suse.de>2015-06-10 10:31:10 +0200
commit98a226ed21949601b270f7ea20abc9f72f7b0be9 (patch)
tree44f4f94a3a0f9609b74c7e1c6b3b92a9a60a3fb9 /sound
parentALSA: hda - fix number of devices query on hotplug (diff)
downloadlinux-dev-98a226ed21949601b270f7ea20abc9f72f7b0be9.tar.xz
linux-dev-98a226ed21949601b270f7ea20abc9f72f7b0be9.zip
ALSA: hda - Don't actually write registers for caps overwrites
Along with the transition to regmap for managing the cached parameter reads, the caps overwrite was also moved to regmap cache. The cache change itself works, but it still tries to write the non-existing verb (the HDA parameter is read-only) wrongly. It's harmless in most cases, but some chips are picky and may result in the codec communication stall. This patch avoids it just by adding the missing flag check in reg_write ops. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/hda/hdac_regmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/hda/hdac_regmap.c b/sound/hda/hdac_regmap.c
index 7371e0c3926f..c4f5e61d4404 100644
--- a/sound/hda/hdac_regmap.c
+++ b/sound/hda/hdac_regmap.c
@@ -265,6 +265,9 @@ static int hda_reg_write(void *context, unsigned int reg, unsigned int val)
unsigned int verb;
int i, bytes, err;
+ if (codec->caps_overwriting)
+ return 0;
+
reg &= ~0x00080000U; /* drop GET bit */
reg |= (codec->addr << 28);
verb = get_verb(reg);