ALSA: fireface: add support for second optical interface for ADAT stream

Unlike Fireface 400, Fireface 800 have two pair of optical interface
for ADAT signal and S/PDIF signal. ADAT signals for the interface
are handled for sampling clock source separately.

This commit modifies a parser for clock configuration to distinguish
these two ADAT signals.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Sakamoto
2018-12-11 19:17:31 +09:00
committed by Takashi Iwai
parent 3c3b892b37
commit 5bfb841e2f
3 changed files with 30 additions and 10 deletions

View File

@@ -46,8 +46,14 @@ int snd_ff_transaction_get_clock(struct snd_ff *ff, unsigned int *rate,
if (data & 0x01) {
*src = SND_FF_CLOCK_SRC_INTERNAL;
} else {
/* TODO: 0x00, 0x01, 0x02, 0x06, 0x07? */
/* TODO: 0x02, 0x06, 0x07? */
switch ((data >> 10) & 0x07) {
case 0x00:
*src = SND_FF_CLOCK_SRC_ADAT1;
break;
case 0x01:
*src = SND_FF_CLOCK_SRC_ADAT2;
break;
case 0x03:
*src = SND_FF_CLOCK_SRC_SPDIF;
break;
@@ -57,10 +63,8 @@ int snd_ff_transaction_get_clock(struct snd_ff *ff, unsigned int *rate,
case 0x05:
*src = SND_FF_CLOCK_SRC_LTC;
break;
case 0x00:
default:
*src = SND_FF_CLOCK_SRC_ADAT;
break;
return -EIO;
}
}