Re: Commit a551d91473 (ALSA: hda - Use regmap for command verb caches, too) breaks TOSLINK

Takashi Iwai
2015-04-16T13:23:09Z

At Thu, 16 Apr 2015 13:14:00 +0200,
Markus Trippelsdorf wrote:
>
> On 2015.04.16 at 09:56 +0200, Takashi Iwai wrote:
> > At Thu, 16 Apr 2015 09:15:04 +0200,
> > Markus Trippelsdorf wrote:
> > >
> > > Hi,
> > >
> > > since commit a551d914:
> > > Author: Takashi Iwai <tiwai@suse.de>
> > > Date: Thu Feb 26 12:34:49 2015 +0100
> > >
> > > ALSA: hda - Use regmap for command verb caches, too
> > >
> > > my DAC receives no signal over TOSLINK-S/PDIF anymore.
> > >
> > > Reverting the commit on top of the current Linus tree "fixes" the issue.
> >
> > Could you give alsa-info.sh outputs from both working and non-working
> > cases? Run the script with --no-upload option and give attachments
> > (better compressed). Take snapshots while you're testing the
> > playback.
>
> Attached.

Thanks. Could you try the patch below?

Takashi

-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ALSA: hda - Fix regression for slave SPDIF setups

The commit [a551d91473e5: ALSA: hda - Use regmap for command verb
caches, too] introduced a regression due to a typo in the conversion;
the IEC958 status bits of slave digital devices aren't updated
correctly. This patch corrects it.

Fixes: a551d91473e5 ('ALSA: hda - Use regmap for command verb caches, too')
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/hda_codec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index e70a7fb393dd..873ed1bce12b 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2529,7 +2529,7 @@ static void set_dig_out(struct hda_codec *codec, hda_nid_t nid,
if (!d)
return;
for (; *d; d++)
- snd_hdac_regmap_update(&codec->core, nid,
+ snd_hdac_regmap_update(&codec->core, *d,
AC_VERB_SET_DIGI_CONVERT_1, mask, val);
}

--
2.3.5