diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2014-04-25 22:45:26 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-05-26 14:32:21 +0200 |
commit | 3149ac489ff8dea0c305c7f97ac2a1b4ad54f5be (patch) | |
tree | ad5ead9df75157589593cd7985aad418cc1aad17 /sound/firewire/bebob/bebob_stream.c | |
parent | 9076c22ddd9d29a30426f0367dec2b40e12536de (diff) |
ALSA: bebob: Add support for M-Audio special Firewire series
This commit allows this driver to support some models which M-Audio produces
with DM1000 but its firmware is special. They are:
- Firewire 1814
- ProjectMix I/O
They have heavily customized firmware. The usual operations can't be applied to
them. For this reason, this commit adds a model specific member to 'struct
snd_bebob' and some model specific functions. Some parameters are write-only so
this commit also adds control interface for applications to set them.
M-Audio special firmware quirks:
- Just after powering on, they wait to download firmware. This state is
changed when receiving cue. Then bus reset is generated and the device is
recognized as a different model with the uploaded firmware.
- They don't respond against BridgeCo AV/C extension commands. So drivers
can't get their stream formations and so on.
- They do not start to transmit packets only by establishing connection but
also by receiving SIGNAL FORMAT command.
- After booting up, they often fail to send response against driver's request
due to mismatch of gap_count.
This module don't support to upload firmware.
Tested-by: Darren Anderson <darrena092@gmail.com> (ProjectMix I/O)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/bebob/bebob_stream.c')
-rw-r--r-- | sound/firewire/bebob/bebob_stream.c | 45 |
1 files changed, 36 insertions, 9 deletions
diff --git a/sound/firewire/bebob/bebob_stream.c b/sound/firewire/bebob/bebob_stream.c index 5fc52706f7c5..2695b7899410 100644 --- a/sound/firewire/bebob/bebob_stream.c +++ b/sound/firewire/bebob/bebob_stream.c @@ -389,6 +389,10 @@ break_both_connections(struct snd_bebob *bebob) cmp_connection_break(&bebob->out_conn); bebob->connected = false; + + /* These models seems to be in transition state for a longer time. */ + if (bebob->maudio_special_quirk != NULL) + msleep(200); } static void @@ -421,9 +425,11 @@ start_stream(struct snd_bebob *bebob, struct amdtp_stream *stream, conn = &bebob->out_conn; /* channel mapping */ - err = map_data_channels(bebob, stream); - if (err < 0) - goto end; + if (bebob->maudio_special_quirk == NULL) { + err = map_data_channels(bebob, stream); + if (err < 0) + goto end; + } /* start amdtp stream */ err = amdtp_stream_start(stream, @@ -555,13 +561,17 @@ int snd_bebob_stream_start_duplex(struct snd_bebob *bebob, int rate) * NOTE: * If establishing connections at first, Yamaha GO46 * (and maybe Terratec X24) don't generate sound. + * + * For firmware customized by M-Audio, refer to next NOTE. */ - err = rate_spec->set(bebob, rate); - if (err < 0) { - dev_err(&bebob->unit->device, - "fail to set sampling rate: %d\n", - err); - goto end; + if (bebob->maudio_special_quirk == NULL) { + err = rate_spec->set(bebob, rate); + if (err < 0) { + dev_err(&bebob->unit->device, + "fail to set sampling rate: %d\n", + err); + goto end; + } } err = make_both_connections(bebob, rate); @@ -576,6 +586,23 @@ int snd_bebob_stream_start_duplex(struct snd_bebob *bebob, int rate) goto end; } + /* + * NOTE: + * The firmware customized by M-Audio uses these commands to + * start transmitting stream. This is not usual way. + */ + if (bebob->maudio_special_quirk != NULL) { + err = rate_spec->set(bebob, rate); + if (err < 0) { + dev_err(&bebob->unit->device, + "fail to ensure sampling rate: %d\n", + err); + amdtp_stream_stop(master); + break_both_connections(bebob); + goto end; + } + } + /* wait first callback */ if (!amdtp_stream_wait_callback(master, CALLBACK_TIMEOUT)) { amdtp_stream_stop(master); |