aboutsummaryrefslogtreecommitdiffstats
path: root/sound/firewire
diff options
context:
space:
mode:
Diffstat (limited to 'sound/firewire')
-rw-r--r--sound/firewire/amdtp.c4
-rw-r--r--sound/firewire/speakers.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c
index 5540f707bfdb..d3226892ad6b 100644
--- a/sound/firewire/amdtp.c
+++ b/sound/firewire/amdtp.c
@@ -296,7 +296,7 @@ static void amdtp_write_s32(struct amdtp_out_stream *s,
296 296
297 channels = s->pcm_channels; 297 channels = s->pcm_channels;
298 src = (void *)runtime->dma_area + 298 src = (void *)runtime->dma_area +
299 s->pcm_buffer_pointer * (runtime->frame_bits / 8); 299 frames_to_bytes(runtime, s->pcm_buffer_pointer);
300 remaining_frames = runtime->buffer_size - s->pcm_buffer_pointer; 300 remaining_frames = runtime->buffer_size - s->pcm_buffer_pointer;
301 frame_step = s->data_block_quadlets - channels; 301 frame_step = s->data_block_quadlets - channels;
302 302
@@ -322,7 +322,7 @@ static void amdtp_write_s16(struct amdtp_out_stream *s,
322 322
323 channels = s->pcm_channels; 323 channels = s->pcm_channels;
324 src = (void *)runtime->dma_area + 324 src = (void *)runtime->dma_area +
325 s->pcm_buffer_pointer * (runtime->frame_bits / 8); 325 frames_to_bytes(runtime, s->pcm_buffer_pointer);
326 remaining_frames = runtime->buffer_size - s->pcm_buffer_pointer; 326 remaining_frames = runtime->buffer_size - s->pcm_buffer_pointer;
327 frame_step = s->data_block_quadlets - channels; 327 frame_step = s->data_block_quadlets - channels;
328 328
diff --git a/sound/firewire/speakers.c b/sound/firewire/speakers.c
index eb3f7dce1d6c..cc8bc3a51bc1 100644
--- a/sound/firewire/speakers.c
+++ b/sound/firewire/speakers.c
@@ -49,7 +49,6 @@ struct fwspk {
49 struct snd_card *card; 49 struct snd_card *card;
50 struct fw_unit *unit; 50 struct fw_unit *unit;
51 const struct device_info *device_info; 51 const struct device_info *device_info;
52 struct snd_pcm_substream *pcm;
53 struct mutex mutex; 52 struct mutex mutex;
54 struct cmp_connection connection; 53 struct cmp_connection connection;
55 struct amdtp_out_stream stream; 54 struct amdtp_out_stream stream;
@@ -361,8 +360,7 @@ static int fwspk_create_pcm(struct fwspk *fwspk)
361 return err; 360 return err;
362 pcm->private_data = fwspk; 361 pcm->private_data = fwspk;
363 strcpy(pcm->name, fwspk->device_info->short_name); 362 strcpy(pcm->name, fwspk->device_info->short_name);
364 fwspk->pcm = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; 363 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &ops);
365 fwspk->pcm->ops = &ops;
366 return 0; 364 return 0;
367} 365}
368 366