summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/firewire/amdtp.c4
-rw-r--r--sound/firewire/amdtp.h3
-rw-r--r--sound/firewire/bebob/bebob_stream.c6
-rw-r--r--sound/firewire/dice/dice-stream.c12
-rw-r--r--sound/firewire/fireworks/fireworks_stream.c2
-rw-r--r--sound/firewire/oxfw/oxfw-stream.c2
6 files changed, 17 insertions, 12 deletions
diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c
index 2bacb5173ff8..094982f7c0fd 100644
--- a/sound/firewire/amdtp.c
+++ b/sound/firewire/amdtp.c
@@ -193,6 +193,7 @@ EXPORT_SYMBOL(amdtp_stream_add_pcm_hw_constraints);
* @pcm_channels: the number of PCM samples in each data block, to be encoded
* as AM824 multi-bit linear audio
* @midi_ports: the number of MIDI ports (i.e., MPX-MIDI Data Channels)
+ * @double_pcm_frames: one data block transfers two PCM frames
*
* The parameters must be set before the stream is started, and must not be
* changed while the stream is running.
@@ -200,7 +201,8 @@ EXPORT_SYMBOL(amdtp_stream_add_pcm_hw_constraints);
int amdtp_stream_set_parameters(struct amdtp_stream *s,
unsigned int rate,
unsigned int pcm_channels,
- unsigned int midi_ports)
+ unsigned int midi_ports,
+ bool double_pcm_frames)
{
unsigned int i, sfc, midi_channels;
diff --git a/sound/firewire/amdtp.h b/sound/firewire/amdtp.h
index 3fb8db7ecd68..2c9130695780 100644
--- a/sound/firewire/amdtp.h
+++ b/sound/firewire/amdtp.h
@@ -177,7 +177,8 @@ void amdtp_stream_destroy(struct amdtp_stream *s);
int amdtp_stream_set_parameters(struct amdtp_stream *s,
unsigned int rate,
unsigned int pcm_channels,
- unsigned int midi_ports);
+ unsigned int midi_ports,
+ bool double_pcm_frames);
unsigned int amdtp_stream_get_max_payload(struct amdtp_stream *s);
int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed);
diff --git a/sound/firewire/bebob/bebob_stream.c b/sound/firewire/bebob/bebob_stream.c
index c642b79e7ed4..920a3b8844ee 100644
--- a/sound/firewire/bebob/bebob_stream.c
+++ b/sound/firewire/bebob/bebob_stream.c
@@ -428,14 +428,16 @@ make_both_connections(struct snd_bebob *bebob, unsigned int rate)
pcm_channels = bebob->tx_stream_formations[index].pcm;
midi_channels = bebob->tx_stream_formations[index].midi;
err = amdtp_stream_set_parameters(&bebob->tx_stream, rate,
- pcm_channels, midi_channels * 8);
+ pcm_channels, midi_channels * 8,
+ false);
if (err < 0)
goto end;
pcm_channels = bebob->rx_stream_formations[index].pcm;
midi_channels = bebob->rx_stream_formations[index].midi;
err = amdtp_stream_set_parameters(&bebob->rx_stream, rate,
- pcm_channels, midi_channels * 8);
+ pcm_channels, midi_channels * 8,
+ false);
if (err < 0)
goto end;
diff --git a/sound/firewire/dice/dice-stream.c b/sound/firewire/dice/dice-stream.c
index c96306adcae0..e4c6c20d70a0 100644
--- a/sound/firewire/dice/dice-stream.c
+++ b/sound/firewire/dice/dice-stream.c
@@ -100,6 +100,7 @@ static int start_stream(struct snd_dice *dice, struct amdtp_stream *stream,
{
struct fw_iso_resources *resources;
unsigned int i, mode, pcm_chs, midi_ports;
+ bool double_pcm_frames;
int err;
err = snd_dice_stream_get_rate_mode(dice, rate, &mode);
@@ -125,19 +126,18 @@ static int start_stream(struct snd_dice *dice, struct amdtp_stream *stream,
* For this quirk, blocking mode is required and PCM buffer size should
* be aligned to SYT_INTERVAL.
*/
- if (mode > 1) {
+ double_pcm_frames = mode > 1;
+ if (double_pcm_frames) {
rate /= 2;
pcm_chs *= 2;
- stream->double_pcm_frames = true;
- } else {
- stream->double_pcm_frames = false;
}
- err = amdtp_stream_set_parameters(stream, rate, pcm_chs, midi_ports);
+ err = amdtp_stream_set_parameters(stream, rate, pcm_chs, midi_ports,
+ false);
if (err < 0)
goto end;
- if (mode > 1) {
+ if (double_pcm_frames) {
pcm_chs /= 2;
for (i = 0; i < pcm_chs; i++) {
diff --git a/sound/firewire/fireworks/fireworks_stream.c b/sound/firewire/fireworks/fireworks_stream.c
index dfefccff3c55..85a72e63913d 100644
--- a/sound/firewire/fireworks/fireworks_stream.c
+++ b/sound/firewire/fireworks/fireworks_stream.c
@@ -74,7 +74,7 @@ start_stream(struct snd_efw *efw, struct amdtp_stream *stream,
}
err = amdtp_stream_set_parameters(stream, sampling_rate,
- pcm_channels, midi_ports);
+ pcm_channels, midi_ports, false);
if (err < 0)
goto end;
diff --git a/sound/firewire/oxfw/oxfw-stream.c b/sound/firewire/oxfw/oxfw-stream.c
index d119468fedf4..318f78e1a313 100644
--- a/sound/firewire/oxfw/oxfw-stream.c
+++ b/sound/firewire/oxfw/oxfw-stream.c
@@ -156,7 +156,7 @@ static int start_stream(struct snd_oxfw *oxfw, struct amdtp_stream *stream,
goto end;
}
err = amdtp_stream_set_parameters(stream, rate,
- pcm_channels, midi_ports);
+ pcm_channels, midi_ports, false);
if (err < 0)
goto end;