Skip to content

Commit

Permalink
ALSA: bebob: fix wrong decoding of clock information for Terratec PHA…
Browse files Browse the repository at this point in the history
…SE 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 <[email protected]>
Tested-by: András Murányi <[email protected]>
Signed-off-by: Takashi Sakamoto <[email protected]>
Acked-by: Clemens Ladisch <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
takaswie authored and tiwai committed Oct 27, 2014
1 parent 5677986 commit 7ce5c92
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sound/firewire/bebob/bebob_terratec.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ phase88_rack_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
if (err < 0)
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:
return err;
}
Expand Down

0 comments on commit 7ce5c92

Please sign in to comment.