ALSA: bebob: distinguish M-Audio ProFire Lightbridge quirk

In former commit, ALSA IEC 61883-1/6 packet streaming engine drops
initial tx packets till the packet includes any event. This allows ALSA
bebob driver not to give option to skip initial packet since the engine
does drop the initial packet.

However, M-Audio ProFire Lightbridge has a quirk to stop packet
transmission after start multiplexing event to the packet. After several
thousands cycles, it restart packet transmission again.

This commit specializes the usage of initial skip option for the model.
Additionally, this commit expands timeout enough to wait processing
content of tx packet.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210524031346.50539-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Sakamoto 2021-05-24 12:13:46 +09:00 committed by Takashi Iwai
parent 266807f94e
commit 5ec85c198e
3 changed files with 17 additions and 6 deletions

View File

@ -64,6 +64,7 @@ static DECLARE_BITMAP(devices_used, SNDRV_CARDS);
#define MODEL_MAUDIO_AUDIOPHILE_BOTH 0x00010060
#define MODEL_MAUDIO_FW1814 0x00010071
#define MODEL_MAUDIO_PROJECTMIX 0x00010091
#define MODEL_MAUDIO_PROFIRELIGHTBRIDGE 0x000100a1
static int
name_device(struct snd_bebob *bebob)
@ -210,6 +211,13 @@ do_registration(struct work_struct *work)
if (err < 0)
goto error;
// M-Audio ProFire Lightbridge has a quirk to transfer packets with discontinuous cycle or
// data block counter in early stage of packet streaming. The cycle span from the first
// packet with event is variable.
if (bebob->entry->vendor_id == VEN_MAUDIO1 &&
bebob->entry->model_id == MODEL_MAUDIO_PROFIRELIGHTBRIDGE)
bebob->discontinuity_quirk = true;
err = snd_bebob_stream_init_duplex(bebob);
if (err < 0)
goto error;
@ -476,7 +484,7 @@ static const struct ieee1394_device_id bebob_id_table[] = {
/* M-Audio NRV10 */
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010081, &maudio_nrv10_spec),
/* M-Audio, ProFireLightbridge */
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x000100a1, &spec_normal),
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_PROFIRELIGHTBRIDGE, &spec_normal),
/* Firewire 1814 */
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010070, NULL), /* bootloader */
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_FW1814,

View File

@ -115,6 +115,7 @@ struct snd_bebob {
/* For BeBoB version quirk. */
unsigned int version;
bool discontinuity_quirk;
struct amdtp_domain domain;
};

View File

@ -7,7 +7,7 @@
#include "./bebob.h"
#define READY_TIMEOUT_MS 2500
#define READY_TIMEOUT_MS 4000
/*
* NOTE;
@ -644,12 +644,14 @@ int snd_bebob_stream_start_duplex(struct snd_bebob *bebob)
if (err < 0)
goto error;
// Some devices transfer isoc packets with discontinuous counter in the beginning
// of packet streaming.
if (bebob->version < 2)
tx_init_skip_cycles = 3200;
if (!bebob->discontinuity_quirk)
tx_init_skip_cycles = 0;
else
tx_init_skip_cycles = 16000;
// MEMO: In the early stage of packet streaming, the device transfers NODATA packets.
// After several hundred cycles, it begins to multiplex event into the packet with
// syt information.
err = amdtp_domain_start(&bebob->domain, tx_init_skip_cycles);
if (err < 0)
goto error;