aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>2015-06-12 14:33:07 +0200
committerGerd Hoffmann <kraxel@redhat.com>2015-06-15 12:42:48 +0200
commitd95d7d802c33f6277c9fb967c14ae0cc99aeb072 (patch)
tree032dc7a291bb7ebc27e5f64a806c0dd8f076e9e2 /audio
parentfbb7ef56d55723a4996c288b50a16e6283eea13f (diff)
ossaudio: use trace events instead of debug config flag
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio')
-rw-r--r--audio/ossaudio.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index bdc4b768e7..11e76a15a2 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -30,6 +30,7 @@
#include "qemu/main-loop.h"
#include "qemu/host-utils.h"
#include "audio.h"
+#include "trace.h"
#define AUDIO_CAP "oss"
#include "audio_int.h"
@@ -44,7 +45,6 @@ typedef struct OSSConf {
int fragsize;
const char *devpath_out;
const char *devpath_in;
- int debug;
int exclusive;
int policy;
} OSSConf;
@@ -314,9 +314,7 @@ static int oss_open (int in, struct oss_params *req,
int version;
if (!oss_get_version (fd, &version, typ)) {
- if (conf->debug) {
- dolog ("OSS version = %#x\n", version);
- }
+ trace_oss_version(version);
if (version >= 0x040000) {
int policy = conf->policy;
@@ -427,7 +425,6 @@ static int oss_run_out (HWVoiceOut *hw, int live)
struct audio_buf_info abinfo;
struct count_info cntinfo;
int bufsize;
- OSSConf *conf = oss->conf;
bufsize = hw->samples << hw->info.shift;
@@ -452,19 +449,12 @@ static int oss_run_out (HWVoiceOut *hw, int live)
}
if (abinfo.bytes > bufsize) {
- if (conf->debug) {
- dolog ("warning: Invalid available size, size=%d bufsize=%d\n"
- "please report your OS/audio hw to av1474@comtv.ru\n",
- abinfo.bytes, bufsize);
- }
+ trace_oss_invalid_available_size(abinfo.bytes, bufsize);
abinfo.bytes = bufsize;
}
if (abinfo.bytes < 0) {
- if (conf->debug) {
- dolog ("warning: Invalid available size, size=%d bufsize=%d\n",
- abinfo.bytes, bufsize);
- }
+ trace_oss_invalid_available_size(abinfo.bytes, bufsize);
return 0;
}
@@ -852,7 +842,6 @@ static OSSConf glob_conf = {
.fragsize = 4096,
.devpath_out = "/dev/dsp",
.devpath_in = "/dev/dsp",
- .debug = 0,
.exclusive = 0,
.policy = 5
};
@@ -919,12 +908,6 @@ static struct audio_option oss_options[] = {
.descr = "Set the timing policy of the device, -1 to use fragment mode",
},
#endif
- {
- .name = "DEBUG",
- .tag = AUD_OPT_BOOL,
- .valp = &glob_conf.debug,
- .descr = "Turn on some debugging messages"
- },
{ /* End of list */ }
};