alsaaudio: remove #ifdef DEBUG to avoid bit rot
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>stable-6.1
parent
38848ce565
commit
243011896a
|
@ -34,6 +34,8 @@
|
||||||
#define AUDIO_CAP "alsa"
|
#define AUDIO_CAP "alsa"
|
||||||
#include "audio_int.h"
|
#include "audio_int.h"
|
||||||
|
|
||||||
|
#define DEBUG_ALSA 0
|
||||||
|
|
||||||
struct pollhlp {
|
struct pollhlp {
|
||||||
snd_pcm_t *handle;
|
snd_pcm_t *handle;
|
||||||
struct pollfd *pfds;
|
struct pollfd *pfds;
|
||||||
|
@ -587,16 +589,12 @@ static int alsa_open(bool in, struct alsa_params_req *req,
|
||||||
|
|
||||||
*handlep = handle;
|
*handlep = handle;
|
||||||
|
|
||||||
if (obtfmt != req->fmt ||
|
if (DEBUG_ALSA || obtfmt != req->fmt ||
|
||||||
obt->nchannels != req->nchannels ||
|
obt->nchannels != req->nchannels || obt->freq != req->freq) {
|
||||||
obt->freq != req->freq) {
|
|
||||||
dolog ("Audio parameters for %s\n", typ);
|
dolog ("Audio parameters for %s\n", typ);
|
||||||
alsa_dump_info(req, obt, obtfmt, apdo);
|
alsa_dump_info(req, obt, obtfmt, apdo);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
alsa_dump_info(req, obt, obtfmt, apdo);
|
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
|
|
Loading…
Reference in New Issue