summaryrefslogtreecommitdiff
path: root/audio/audio_int.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2012-04-17 14:32:36 +0200
committermalc <av1474@comtv.ru>2012-04-17 16:57:57 +0400
commitc01b2456238f73964876471452e27d4aad7900fb (patch)
tree828e8798ffc13fac2972657332fdc9bccd7ee965 /audio/audio_int.h
parent6c95ab94f9f7e8d3156e4e16ecc7c499e141bb1a (diff)
audio: don't apply volume effect if backend has VOICE_VOLUME_CAP
If the audio backend is capable of volume control, don't apply software volume (mixeng_volume ()), but instead, rely on backend volume control. This will allow guest to have full range volume control. Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'audio/audio_int.h')
-rw-r--r--audio/audio_int.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/audio/audio_int.h b/audio/audio_int.h
index 117f95e36b..b9b0676d77 100644
--- a/audio/audio_int.h
+++ b/audio/audio_int.h
@@ -82,6 +82,7 @@ typedef struct HWVoiceOut {
int samples;
QLIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head;
QLIST_HEAD (sw_cap_listhead, SWVoiceCap) cap_head;
+ int ctl_caps;
struct audio_pcm_ops *pcm_ops;
QLIST_ENTRY (HWVoiceOut) entries;
} HWVoiceOut;
@@ -101,6 +102,7 @@ typedef struct HWVoiceIn {
int samples;
QLIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head;
+ int ctl_caps;
struct audio_pcm_ops *pcm_ops;
QLIST_ENTRY (HWVoiceIn) entries;
} HWVoiceIn;
@@ -150,6 +152,7 @@ struct audio_driver {
int max_voices_in;
int voice_size_out;
int voice_size_in;
+ int ctl_caps;
};
struct audio_pcm_ops {
@@ -233,6 +236,8 @@ void audio_run (const char *msg);
#define VOICE_DISABLE 2
#define VOICE_VOLUME 3
+#define VOICE_VOLUME_CAP (1 << VOICE_VOLUME)
+
static inline int audio_ring_dist (int dst, int src, int len)
{
return (dst >= src) ? (dst - src) : (len - src + dst);