Commit 7ce5c926 authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai

ALSA: bebob: fix wrong decoding of clock information for Terratec PHASE 88 Rack FW

Terratec PHASE 88 rack fw has two registers for source of clock, one is
for internal/external, and another is for wordclock/spdif for external.

When clock source is internal, information in another register has no meaning.
Thus it must be ignored, but current implementation decodes it. This causes
over-indexing reference to labels.
Reported-by: default avatarAndrás Murányi <muranyia@gmail.com>
Tested-by: default avatarAndrás Murányi <muranyia@gmail.com>
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 56779864
...@@ -24,7 +24,12 @@ phase88_rack_clk_src_get(struct snd_bebob *bebob, unsigned int *id) ...@@ -24,7 +24,12 @@ phase88_rack_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
if (err < 0) if (err < 0)
goto end; goto end;
*id = (enable_ext & 0x01) | ((enable_word & 0x01) << 1); if (enable_ext == 0)
*id = 0;
else if (enable_word == 0)
*id = 1;
else
*id = 2;
end: end:
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment