Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f403286 authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai
Browse files

ALSA: bebob: Fix failure to detect source of clock for Terratec Phase 88



This patch fixes a failure to open PCM device with -ENOSYS in
Terratec Phase 88.

Terratec Phase 88 has two Selector Function Blocks of AVC Audio subunit
to switch source of clock. One is to switch internal/external for the
source and another is to switch word/spdif for the external clock.

The IDs for these Selector Function Blocks are 9 and 8. But in current
implementation they're 0 and 0.

Reported-by: default avatarAndrás Murányi <muranyia@gmail.com>
Tested-by: default avatarAndrás Murányi <muranyia@gmail.com>
Cc: <stable@vger.kernel.org> # v3.16+
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent fd1a2a90
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -17,10 +17,10 @@ phase88_rack_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
	unsigned int enable_ext, enable_word;
	unsigned int enable_ext, enable_word;
	int err;
	int err;


	err = avc_audio_get_selector(bebob->unit, 0, 0, &enable_ext);
	err = avc_audio_get_selector(bebob->unit, 0, 9, &enable_ext);
	if (err < 0)
	if (err < 0)
		goto end;
		goto end;
	err = avc_audio_get_selector(bebob->unit, 0, 0, &enable_word);
	err = avc_audio_get_selector(bebob->unit, 0, 8, &enable_word);
	if (err < 0)
	if (err < 0)
		goto end;
		goto end;