aboutsummaryrefslogtreecommitdiffstats
path: root/sound/firewire/fireworks
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2014-04-25 09:45:05 -0400
committerTakashi Iwai <tiwai@suse.de>2014-05-26 08:25:00 -0400
commit697022391e46614184101c59e46c9671598026db (patch)
tree184134a0b33f09ac49d8301f534dc9e83f61c2a8 /sound/firewire/fireworks
parentc8bdf49b9935cdeec917347df00a5434d58e9df0 (diff)
ALSA: fireworks/firewire-lib: Add a quirk for wrong dbs in tx packets
One of Fireworks firmware, named as 'AudioFire9', seems to transmit packets with wrong value of dbs. It's always 0x11 but actual size of data block is different. This commit adds a flag for this quirk and some codes to calculate correct size. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireworks')
-rw-r--r--sound/firewire/fireworks/fireworks.c2
-rw-r--r--sound/firewire/fireworks/fireworks.h3
-rw-r--r--sound/firewire/fireworks/fireworks_stream.c3
3 files changed, 8 insertions, 0 deletions
diff --git a/sound/firewire/fireworks/fireworks.c b/sound/firewire/fireworks/fireworks.c
index 307fb2f250da..02b3259059f0 100644
--- a/sound/firewire/fireworks/fireworks.c
+++ b/sound/firewire/fireworks/fireworks.c
@@ -205,6 +205,8 @@ efw_probe(struct fw_unit *unit,
205 err = get_hardware_info(efw); 205 err = get_hardware_info(efw);
206 if (err < 0) 206 if (err < 0)
207 goto error; 207 goto error;
208 if (entry->model_id == MODEL_ECHO_AUDIOFIRE_9)
209 efw->is_af9 = true;
208 210
209 err = snd_efw_stream_init_duplex(efw); 211 err = snd_efw_stream_init_duplex(efw);
210 if (err < 0) 212 if (err < 0)
diff --git a/sound/firewire/fireworks/fireworks.h b/sound/firewire/fireworks/fireworks.h
index ce511be4611b..9534e93e3a36 100644
--- a/sound/firewire/fireworks/fireworks.h
+++ b/sound/firewire/fireworks/fireworks.h
@@ -61,6 +61,9 @@ struct snd_efw {
61 u32 seqnum; 61 u32 seqnum;
62 bool resp_addr_changable; 62 bool resp_addr_changable;
63 63
64 /* for quirks */
65 bool is_af9;
66
64 unsigned int midi_in_ports; 67 unsigned int midi_in_ports;
65 unsigned int midi_out_ports; 68 unsigned int midi_out_ports;
66 69
diff --git a/sound/firewire/fireworks/fireworks_stream.c b/sound/firewire/fireworks/fireworks_stream.c
index d687b047446b..7447af72ae30 100644
--- a/sound/firewire/fireworks/fireworks_stream.c
+++ b/sound/firewire/fireworks/fireworks_stream.c
@@ -198,6 +198,9 @@ int snd_efw_stream_init_duplex(struct snd_efw *efw)
198 efw->tx_stream.flags |= CIP_EMPTY_WITH_TAG0; 198 efw->tx_stream.flags |= CIP_EMPTY_WITH_TAG0;
199 /* Fireworks has its own meaning for dbc. */ 199 /* Fireworks has its own meaning for dbc. */
200 efw->tx_stream.flags |= CIP_DBC_IS_END_EVENT; 200 efw->tx_stream.flags |= CIP_DBC_IS_END_EVENT;
201 /* AudioFire9 always reports wrong dbs. */
202 if (efw->is_af9)
203 efw->tx_stream.flags |= CIP_WRONG_DBS;
201 204
202 err = init_stream(efw, &efw->rx_stream); 205 err = init_stream(efw, &efw->rx_stream);
203 if (err < 0) { 206 if (err < 0) {