forked from Minki/linux
ALSA: oxfw: add quirk flag for blocking transmission method
Stanton SCS.1m and Apogee Duet FireWire use blocking transmission method unlike the other models. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20210518084557.102681-12-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
a6f9169323
commit
07a35edc59
@ -153,9 +153,14 @@ static int init_stream(struct snd_oxfw *oxfw, struct amdtp_stream *stream)
|
||||
struct cmp_connection *conn;
|
||||
enum cmp_direction c_dir;
|
||||
enum amdtp_stream_direction s_dir;
|
||||
unsigned int flags = CIP_NONBLOCKING;
|
||||
unsigned int flags;
|
||||
int err;
|
||||
|
||||
if (!(oxfw->quirks & SND_OXFW_QUIRK_BLOCKING_TRANSMISSION))
|
||||
flags = CIP_NONBLOCKING;
|
||||
else
|
||||
flags = CIP_BLOCKING;
|
||||
|
||||
if (stream == &oxfw->tx_stream) {
|
||||
conn = &oxfw->out_conn;
|
||||
c_dir = CMP_OUTPUT;
|
||||
|
@ -23,6 +23,8 @@
|
||||
#define OUI_APOGEE 0x0003db
|
||||
|
||||
#define MODEL_SATELLITE 0x00200f
|
||||
#define MODEL_SCS1M 0x001000
|
||||
#define MODEL_DUET_FW 0x01dddd
|
||||
|
||||
#define SPECIFIER_1394TA 0x00a02d
|
||||
#define VERSION_AVC 0x010001
|
||||
@ -144,13 +146,19 @@ static int detect_quirks(struct snd_oxfw *oxfw)
|
||||
* messages.
|
||||
*/
|
||||
if (oxfw->entry->vendor_id == OUI_STANTON) {
|
||||
/* No physical MIDI ports. */
|
||||
if (oxfw->entry->model_id == MODEL_SCS1M)
|
||||
oxfw->quirks |= SND_OXFW_QUIRK_BLOCKING_TRANSMISSION;
|
||||
|
||||
// No physical MIDI ports.
|
||||
oxfw->midi_input_ports = 0;
|
||||
oxfw->midi_output_ports = 0;
|
||||
|
||||
return snd_oxfw_scs1x_add(oxfw);
|
||||
}
|
||||
|
||||
if (oxfw->entry->vendor_id == OUI_APOGEE && oxfw->entry->model_id == MODEL_DUET_FW)
|
||||
oxfw->quirks |= SND_OXFW_QUIRK_BLOCKING_TRANSMISSION;
|
||||
|
||||
/*
|
||||
* TASCAM FireOne has physical control and requires a pair of additional
|
||||
* MIDI ports.
|
||||
@ -377,11 +385,11 @@ static const struct ieee1394_device_id oxfw_id_table[] = {
|
||||
// TASCAM, FireOne.
|
||||
OXFW_DEV_ENTRY(VENDOR_TASCAM, 0x800007, NULL),
|
||||
// Stanton, Stanton Controllers & Systems 1 Mixer (SCS.1m).
|
||||
OXFW_DEV_ENTRY(OUI_STANTON, 0x001000, NULL),
|
||||
OXFW_DEV_ENTRY(OUI_STANTON, MODEL_SCS1M, NULL),
|
||||
// Stanton, Stanton Controllers & Systems 1 Deck (SCS.1d).
|
||||
OXFW_DEV_ENTRY(OUI_STANTON, 0x002000, NULL),
|
||||
// APOGEE, duet FireWire.
|
||||
OXFW_DEV_ENTRY(OUI_APOGEE, 0x01dddd, NULL),
|
||||
OXFW_DEV_ENTRY(OUI_APOGEE, MODEL_DUET_FW, NULL),
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(ieee1394, oxfw_id_table);
|
||||
|
@ -38,6 +38,8 @@ enum snd_oxfw_quirk {
|
||||
SND_OXFW_QUIRK_JUMBO_PAYLOAD = 0x01,
|
||||
// The dbs field of CIP header in tx packet is wrong.
|
||||
SND_OXFW_QUIRK_WRONG_DBS = 0x02,
|
||||
// Blocking transmission mode is used.
|
||||
SND_OXFW_QUIRK_BLOCKING_TRANSMISSION = 0x04,
|
||||
};
|
||||
|
||||
/* This is an arbitrary number for convinience. */
|
||||
|
Loading…
Reference in New Issue
Block a user