[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/7] alsaaudio: remove #ifdef DEBUG to avoid bit rot
From: |
Gerd Hoffmann |
Subject: |
[PULL 1/7] alsaaudio: remove #ifdef DEBUG to avoid bit rot |
Date: |
Thu, 17 Jun 2021 14:41:01 +0200 |
From: Volker RĂ¼melin <vr_qemu@t-online.de>
Merge the #ifdef DEBUG code with the if statement a few lines
above to avoid bit rot.
Suggested-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Volker RĂ¼melin <vr_qemu@t-online.de>
Message-Id: <20210517194604.2545-1-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
audio/alsaaudio.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index fcc2f62864fb..2b9789e64771 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -34,6 +34,8 @@
#define AUDIO_CAP "alsa"
#include "audio_int.h"
+#define DEBUG_ALSA 0
+
struct pollhlp {
snd_pcm_t *handle;
struct pollfd *pfds;
@@ -587,16 +589,12 @@ static int alsa_open(bool in, struct alsa_params_req *req,
*handlep = handle;
- if (obtfmt != req->fmt ||
- obt->nchannels != req->nchannels ||
- obt->freq != req->freq) {
+ if (DEBUG_ALSA || obtfmt != req->fmt ||
+ obt->nchannels != req->nchannels || obt->freq != req->freq) {
dolog ("Audio parameters for %s\n", typ);
alsa_dump_info(req, obt, obtfmt, apdo);
}
-#ifdef DEBUG
- alsa_dump_info(req, obt, obtfmt, apdo);
-#endif
return 0;
err:
--
2.31.1
- [PULL 0/7] Audio 20210617 patches, Gerd Hoffmann, 2021/06/17
- [PULL 2/7] paaudio: remove unused stream flags, Gerd Hoffmann, 2021/06/17
- [PULL 1/7] alsaaudio: remove #ifdef DEBUG to avoid bit rot,
Gerd Hoffmann <=
- [PULL 3/7] audio: move code to audio/audio.c, Gerd Hoffmann, 2021/06/17
- [PULL 5/7] hw/audio/sb16: Avoid assertion by restricting I/O sampling rate range, Gerd Hoffmann, 2021/06/17
- [PULL 4/7] jackaudio: avoid that the client name contains the word (NULL), Gerd Hoffmann, 2021/06/17
- [PULL 6/7] audio: Fix format specifications of debug logs, Gerd Hoffmann, 2021/06/17
- [PULL 7/7] coreaudio: Fix output stream format settings, Gerd Hoffmann, 2021/06/17
- Re: [PULL 0/7] Audio 20210617 patches, no-reply, 2021/06/17
- Re: [PULL 0/7] Audio 20210617 patches, Peter Maydell, 2021/06/18