Skip to content

Commit 67bb66d

Browse files
takaswietiwai
authored andcommitted
ALSA: oxfw: fix functioal regression for silence in Apogee Duet FireWire
OXFW 971 has no function to use the value in syt field of received isochronous packet for playback timing generation. In kernel prepatch for v5.14, ALSA OXFW driver got change to send NO_INFO value in the field instead of actual timing value. The change brings Apogee Duet FireWire to generate no playback sound, while output meter moves. As long as I investigate, _any_ value in the syt field takes the device to generate sound. It's reasonable to think that the device just ignores data blocks in packet with NO_INFO value in its syt field for audio data processing. This commit adds a new flag for the quirk to fix regression. Fixes: 029ffc4 ("ALSA: oxfw: perform sequence replay for media clock recovery") Cc: <[email protected]> Signed-off-by: Takashi Sakamoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent a2befe9 commit 67bb66d

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

sound/firewire/oxfw/oxfw-stream.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,21 @@ static int init_stream(struct snd_oxfw *oxfw, struct amdtp_stream *stream)
153153
struct cmp_connection *conn;
154154
enum cmp_direction c_dir;
155155
enum amdtp_stream_direction s_dir;
156-
unsigned int flags = CIP_UNAWARE_SYT;
156+
unsigned int flags = 0;
157157
int err;
158158

159159
if (!(oxfw->quirks & SND_OXFW_QUIRK_BLOCKING_TRANSMISSION))
160160
flags |= CIP_NONBLOCKING;
161161
else
162162
flags |= CIP_BLOCKING;
163163

164+
// OXFW 970/971 has no function to generate playback timing according to the sequence
165+
// of value in syt field, thus the packet should include NO_INFO value in the field.
166+
// However, some models just ignore data blocks in packet with NO_INFO for audio data
167+
// processing.
168+
if (!(oxfw->quirks & SND_OXFW_QUIRK_IGNORE_NO_INFO_PACKET))
169+
flags |= CIP_UNAWARE_SYT;
170+
164171
if (stream == &oxfw->tx_stream) {
165172
conn = &oxfw->out_conn;
166173
c_dir = CMP_OUTPUT;

sound/firewire/oxfw/oxfw.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ static int detect_quirks(struct snd_oxfw *oxfw, const struct ieee1394_device_id
159159
return snd_oxfw_scs1x_add(oxfw);
160160
}
161161

162-
if (entry->vendor_id == OUI_APOGEE && entry->model_id == MODEL_DUET_FW)
163-
oxfw->quirks |= SND_OXFW_QUIRK_BLOCKING_TRANSMISSION;
162+
if (entry->vendor_id == OUI_APOGEE && entry->model_id == MODEL_DUET_FW) {
163+
oxfw->quirks |= SND_OXFW_QUIRK_BLOCKING_TRANSMISSION |
164+
SND_OXFW_QUIRK_IGNORE_NO_INFO_PACKET;
165+
}
164166

165167
/*
166168
* TASCAM FireOne has physical control and requires a pair of additional

sound/firewire/oxfw/oxfw.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ enum snd_oxfw_quirk {
4242
SND_OXFW_QUIRK_BLOCKING_TRANSMISSION = 0x04,
4343
// Stanton SCS1.d and SCS1.m support unique transaction.
4444
SND_OXFW_QUIRK_SCS_TRANSACTION = 0x08,
45+
// Apogee Duet FireWire ignores data blocks in packet with NO_INFO for audio data
46+
// processing, while output level meter moves. Any value in syt field of packet takes
47+
// the device to process audio data even if the value is invalid in a point of
48+
// IEC 61883-1/6.
49+
SND_OXFW_QUIRK_IGNORE_NO_INFO_PACKET = 0x10,
4550
};
4651

4752
/* This is an arbitrary number for convinience. */

0 commit comments

Comments
 (0)