Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: András Murányi <muranyia@gmail.com>
Tested-by: András Murányi <muranyia@gmail.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Takashi Sakamoto and committed by
Takashi Iwai
7ce5c926 56779864

+6 -1
+6 -1
sound/firewire/bebob/bebob_terratec.c
··· 24 24 if (err < 0) 25 25 goto end; 26 26 27 - *id = (enable_ext & 0x01) | ((enable_word & 0x01) << 1); 27 + if (enable_ext == 0) 28 + *id = 0; 29 + else if (enable_word == 0) 30 + *id = 1; 31 + else 32 + *id = 2; 28 33 end: 29 34 return err; 30 35 }