[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 9/9] audio: revert tests for pcm_ops table
From: |
Volker Rümelin |
Subject: |
[PATCH 9/9] audio: revert tests for pcm_ops table |
Date: |
Sun, 20 Sep 2020 19:17:29 +0200 |
With previous commit every audio backend has a pcm_ops function
table. It's no longer necessary to test if the table is
available. This reverts commit cbaf25d1f5: "audio: fix
wavcapture segfault"
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
---
audio/audio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/audio/audio.c b/audio/audio.c
index b908e041dd..f63781b4db 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -649,7 +649,7 @@ static size_t audio_pcm_sw_read(SWVoiceIn *sw, void *buf,
size_t size)
total += isamp;
}
- if (hw->pcm_ops && !hw->pcm_ops->volume_in) {
+ if (!hw->pcm_ops->volume_in) {
mixeng_volume (sw->buf, ret, &sw->vol);
}
@@ -743,7 +743,7 @@ static size_t audio_pcm_sw_write(SWVoiceOut *sw, void *buf,
size_t size)
if (samples) {
sw->conv(sw->buf, buf, samples);
- if (sw->hw->pcm_ops && !sw->hw->pcm_ops->volume_out) {
+ if (!sw->hw->pcm_ops->volume_out) {
mixeng_volume(sw->buf, samples, &sw->vol);
}
}
--
2.26.2
- [PATCH 0/9] Audio fixes and improvements, Volker Rümelin, 2020/09/20
- [PATCH 1/9] audio: handle buf == NULL in put_buffer_out(), Volker Rümelin, 2020/09/20
- [PATCH 3/9] audio/spiceaudio: always rate limit playback stream, Volker Rümelin, 2020/09/20
- [PATCH 2/9] audio/audio: fix video playback slowdown with spiceaudio, Volker Rümelin, 2020/09/20
- [PATCH 4/9] audio: align audio_generic_read with audio_pcm_hw_run_in, Volker Rümelin, 2020/09/20
- [PATCH 7/9] audio: run downstream playback queue unconditionally, Volker Rümelin, 2020/09/20
- [PATCH 8/9] audio: restore mixing-engine playback buffer size, Volker Rümelin, 2020/09/20
- [PATCH 6/9] audio: align audio_generic_write with audio_pcm_hw_run_out, Volker Rümelin, 2020/09/20
- [PATCH 5/9] audio: remove unnecessary calls to put_buffer_in, Volker Rümelin, 2020/09/20
- [PATCH 9/9] audio: revert tests for pcm_ops table,
Volker Rümelin <=
- Re: [PATCH 0/9] Audio fixes and improvements, Gerd Hoffmann, 2020/09/23