2015-04-16 07:15:12

by Markus Trippelsdorf

[permalink] [raw]
Subject: Commit a551d91473 (ALSA: hda - Use regmap for command verb caches, too) breaks TOSLINK

Hi,

since commit a551d914:
Author: Takashi Iwai <[email protected]>
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.

% aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: VT1708S Analog [VT1708S Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 3: VT1708S Digital [VT1708S Digital]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: ID 791a Digital [ID 791a Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0

[VT1708S Digital] is the device I use.

# cat /etc/asound.conf
pcm.!default {
type hw
card 0
device 3
}

ctl.!default {
type hw
card 0
device 3
}

pcm.crossfeed {
type plug
slave.pcm "ladspa"
}

pcm.guitar {
type plug
slave.pcm "ladspa2"
}

pcm.ladspa {
type ladspa
slave.pcm "plughw:0,3";
path "/usr/lib/ladspa";
plugins [
{
label bs2b
input {
controls [ 700 4 ]
}
}
]
}

pcm.ladspa2{
type ladspa
slave.pcm "plughw:2,0";
path "/usr/lib/ladspa";
plugins [
{
label bs2b
input {
controls [ 700 4 ]
}
}
]
}

--
Markus


2015-04-16 07:57:05

by Takashi Iwai

[permalink] [raw]
Subject: Re: Commit a551d91473 (ALSA: hda - Use regmap for command verb caches, too) breaks TOSLINK

At Thu, 16 Apr 2015 09:15:04 +0200,
Markus Trippelsdorf wrote:
>
> Hi,
>
> since commit a551d914:
> Author: Takashi Iwai <[email protected]>
> 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.
>
> % aplay -l
> **** List of PLAYBACK Hardware Devices ****
> card 0: SB [HDA ATI SB], device 0: VT1708S Analog [VT1708S Analog]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> card 0: SB [HDA ATI SB], device 3: VT1708S Digital [VT1708S Digital]
> Subdevices: 0/1
> Subdevice #0: subdevice #0
> card 1: HDMI [HDA ATI HDMI], device 3: ID 791a Digital [ID 791a Digital]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
>
> [VT1708S Digital] is the device I use.
>
> # cat /etc/asound.conf
> pcm.!default {
> type hw
> card 0
> device 3
> }
>
> ctl.!default {
> type hw
> card 0
> device 3
> }
>
> pcm.crossfeed {
> type plug
> slave.pcm "ladspa"
> }
>
> pcm.guitar {
> type plug
> slave.pcm "ladspa2"
> }
>
> pcm.ladspa {
> type ladspa
> slave.pcm "plughw:0,3";
> path "/usr/lib/ladspa";
> plugins [
> {
> label bs2b
> input {
> controls [ 700 4 ]
> }
> }
> ]
> }
>
> pcm.ladspa2{
> type ladspa
> slave.pcm "plughw:2,0";
> path "/usr/lib/ladspa";
> plugins [
> {
> label bs2b
> input {
> controls [ 700 4 ]
> }
> }
> ]
> }

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.


thanks,

Takashi

2015-04-16 11:14:14

by Markus Trippelsdorf

[permalink] [raw]
Subject: Re: Commit a551d91473 (ALSA: hda - Use regmap for command verb caches, too) breaks TOSLINK

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 <[email protected]>
> > 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.

--
Markus


Attachments:
(No filename) (701.00 B)
alsa_good (34.55 kB)
alsa_bad (34.61 kB)
Download all attachments

2015-04-16 13:23:09

by Takashi Iwai

[permalink] [raw]
Subject: Re: Commit a551d91473 (ALSA: hda - Use regmap for command verb caches, too) breaks TOSLINK

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 <[email protected]>
> > > 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 <[email protected]>
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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
---
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

2015-04-16 13:42:14

by Markus Trippelsdorf

[permalink] [raw]
Subject: Re: Commit a551d91473 (ALSA: hda - Use regmap for command verb caches, too) breaks TOSLINK

On 2015.04.16 at 15:23 +0200, Takashi Iwai wrote:
> 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 <[email protected]>
> > > > 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?

Your patch fixes the issue. Many thanks.

--
Markus

2015-04-16 13:53:28

by Takashi Iwai

[permalink] [raw]
Subject: Re: Commit a551d91473 (ALSA: hda - Use regmap for command verb caches, too) breaks TOSLINK

At Thu, 16 Apr 2015 15:42:08 +0200,
Markus Trippelsdorf wrote:
>
> On 2015.04.16 at 15:23 +0200, Takashi Iwai wrote:
> > 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 <[email protected]>
> > > > > 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?
>
> Your patch fixes the issue. Many thanks.

Great, I merged the patch now.

Thanks for your report and quick test!


Takashi