Skip to content

Commit

Permalink
ALSA: hda - Don't actually write registers for caps overwrites
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Jun 10, 2015
1 parent 132bd96 commit 98a226e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/hda/hdac_regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 98a226e

Please sign in to comment.