aboutsummaryrefslogtreecommitdiff
path: root/audio/noaudio.c
diff options
context:
space:
mode:
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>2019-08-19 01:06:57 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-08-21 09:13:37 +0200
commit1d793fec6cc4b1a6234e70da36be8d6b00aa250b (patch)
tree97a2c19752b31b7a9d099fe71edc39e2648124f0 /audio/noaudio.c
parent10d5e750dcf9059c9039aa66efbdc5730a9cd324 (diff)
audio: remove read and write pcm_ops
They just called audio_pcm_sw_read/write anyway, so it makes no sense to have them too. (The noaudio's read is the only exception, but it should work with the generic code too.) Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: 92ddc98133bc4b687c6e4608b9321e7b64c0e496.1566168923.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio/noaudio.c')
-rw-r--r--audio/noaudio.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/audio/noaudio.c b/audio/noaudio.c
index 14a0e4ab29..cbb02d9e49 100644
--- a/audio/noaudio.c
+++ b/audio/noaudio.c
@@ -61,11 +61,6 @@ static int no_run_out (HWVoiceOut *hw, int live)
return decr;
}
-static int no_write (SWVoiceOut *sw, void *buf, int len)
-{
- return audio_pcm_sw_write(sw, buf, len);
-}
-
static int no_init_out(HWVoiceOut *hw, struct audsettings *as, void *drv_opaque)
{
audio_pcm_init_info (&hw->info, as);
@@ -118,18 +113,6 @@ static int no_run_in (HWVoiceIn *hw)
return samples;
}
-static int no_read (SWVoiceIn *sw, void *buf, int size)
-{
- /* use custom code here instead of audio_pcm_sw_read() to avoid
- * useless resampling/mixing */
- int samples = size >> sw->info.shift;
- int total = sw->hw->total_samples_captured - sw->total_hw_samples_acquired;
- int to_clear = MIN (samples, total);
- sw->total_hw_samples_acquired += total;
- audio_pcm_info_clear_buf (&sw->info, buf, to_clear);
- return to_clear << sw->info.shift;
-}
-
static int no_ctl_in (HWVoiceIn *hw, int cmd, ...)
{
(void) hw;
@@ -151,13 +134,11 @@ static struct audio_pcm_ops no_pcm_ops = {
.init_out = no_init_out,
.fini_out = no_fini_out,
.run_out = no_run_out,
- .write = no_write,
.ctl_out = no_ctl_out,
.init_in = no_init_in,
.fini_in = no_fini_in,
.run_in = no_run_in,
- .read = no_read,
.ctl_in = no_ctl_in
};