[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 16/23] paaudio: remove unneeded code
From: |
Volker Rümelin |
Subject: |
[PATCH 16/23] paaudio: remove unneeded code |
Date: |
Sun, 10 Jan 2021 11:02:32 +0100 |
Commit baea032ec7 "audio/paaudio: fix ignored buffer_length setting"
added code to handle buffer_length defaults. This was unnecessary
because the audio_buffer_* functions in audio/audio.c already handle
this. Remove the unneeded code.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
---
audio/paaudio.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/audio/paaudio.c b/audio/paaudio.c
index 4a1ffda753..86038f3e13 100644
--- a/audio/paaudio.c
+++ b/audio/paaudio.c
@@ -539,8 +539,7 @@ static int qpa_init_out(HWVoiceOut *hw, struct audsettings
*as,
audio_pcm_init_info (&hw->info, &obt_as);
hw->samples = audio_buffer_samples(
- qapi_AudiodevPaPerDirectionOptions_base(ppdo),
- &obt_as, ppdo->buffer_length);
+ qapi_AudiodevPaPerDirectionOptions_base(ppdo), &obt_as, 46440);
return 0;
@@ -587,8 +586,7 @@ static int qpa_init_in(HWVoiceIn *hw, struct audsettings
*as, void *drv_opaque)
audio_pcm_init_info (&hw->info, &obt_as);
hw->samples = audio_buffer_samples(
- qapi_AudiodevPaPerDirectionOptions_base(ppdo),
- &obt_as, ppdo->buffer_length);
+ qapi_AudiodevPaPerDirectionOptions_base(ppdo), &obt_as, 46440);
return 0;
@@ -738,10 +736,6 @@ static void qpa_volume_in(HWVoiceIn *hw, Volume *vol)
static int qpa_validate_per_direction_opts(Audiodev *dev,
AudiodevPaPerDirectionOptions *pdo)
{
- if (!pdo->has_buffer_length) {
- pdo->has_buffer_length = true;
- pdo->buffer_length = 46440;
- }
if (!pdo->has_latency) {
pdo->has_latency = true;
pdo->latency = 15000;
--
2.26.2
- Re: [PATCH 03/23] sdlaudio: add -audiodev sdl, out.buffer-count option, (continued)
- [PATCH 10/23] audio: break generic buffer dependency on mixing-engine, Volker Rümelin, 2021/01/10
- [PATCH 08/23] audio: split pcm_ops function get_buffer_in, Volker Rümelin, 2021/01/10
- [PATCH 09/23] sdlaudio: add recording functions, Volker Rümelin, 2021/01/10
- [PATCH 11/23] sdlaudio: enable (in|out).mixing-engine=off, Volker Rümelin, 2021/01/10
- [PATCH 13/23] paaudio: avoid to clip samples multiple times, Volker Rümelin, 2021/01/10
- [PATCH 14/23] paaudio: wait for PA_STREAM_READY in qpa_write(), Volker Rümelin, 2021/01/10
- [PATCH 15/23] paaudio: wait until the playback stream is ready, Volker Rümelin, 2021/01/10
- [PATCH 12/23] audio: remove remaining unused plive code, Volker Rümelin, 2021/01/10
- [PATCH 16/23] paaudio: remove unneeded code,
Volker Rümelin <=
- [PATCH 18/23] paaudio: limit minreq to 75% of audio timer_rate, Volker Rümelin, 2021/01/10
- [PATCH 20/23] dsoundaudio: replace GetForegroundWindow(), Volker Rümelin, 2021/01/10
- [PATCH 17/23] paaudio: comment bugs in functions qpa_init_*, Volker Rümelin, 2021/01/10
- [PATCH 19/23] paaudio: send recorded data in smaller chunks, Volker Rümelin, 2021/01/10
- [PATCH 21/23] dsoundaudio: rename dsound_open(), Volker Rümelin, 2021/01/10
- [PATCH 22/23] dsoundaudio: enable f32 audio sample format, Volker Rümelin, 2021/01/10
- [PATCH 23/23] dsoundaudio: fix log message, Volker Rümelin, 2021/01/10
- Re: [PATCH 00/23] next round of audio patches, no-reply, 2021/01/10
- Re: [PATCH 00/23] next round of audio patches, Gerd Hoffmann, 2021/01/14