aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/alsa_output_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/output/alsa_output_plugin.c')
-rw-r--r--src/output/alsa_output_plugin.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/output/alsa_output_plugin.c b/src/output/alsa_output_plugin.c
index 21c3b1d22..d131003e3 100644
--- a/src/output/alsa_output_plugin.c
+++ b/src/output/alsa_output_plugin.c
@@ -633,8 +633,9 @@ alsa_setup_or_dsd(struct alsa_data *ad, struct audio_format *audio_format,
if (!success)
return false;
- pcm_export_open(&ad->export, audio_format->format,
- packed, reverse_endian);
+ pcm_export_open(&ad->export,
+ audio_format->format, audio_format->channels,
+ false, packed, reverse_endian);
return true;
}
@@ -777,7 +778,8 @@ alsa_play(struct audio_output *ao, const void *chunk, size_t size,
if (ret > 0) {
ad->period_position = (ad->period_position + ret)
% ad->period_frames;
- return ret * ad->in_frame_size;
+ return pcm_export_source_size(&ad->export,
+ ret * ad->in_frame_size);
}
if (ret < 0 && ret != -EAGAIN && ret != -EINTR &&