aboutsummaryrefslogtreecommitdiff
path: root/hw/audio/cs4231a.c
diff options
context:
space:
mode:
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>2019-03-08 23:34:13 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-03-11 10:29:26 +0100
commit85bc58520c0e43660cbbe51b9eb5022a0baafe9f (patch)
tree6a6e20f651bcb5ae047e90ed823d2dcaa10e06e1 /hw/audio/cs4231a.c
parent8c3a7d008794305b1304549f1d9249c12cbf5b2b (diff)
downloadqemu-85bc58520c0e43660cbbe51b9eb5022a0baafe9f.zip
qemu-85bc58520c0e43660cbbe51b9eb5022a0baafe9f.tar.gz
qemu-85bc58520c0e43660cbbe51b9eb5022a0baafe9f.tar.bz2
audio: use qapi AudioFormat instead of audfmt_e
I had to include an enum for audio sampling formats into qapi, but that meant duplicating the audfmt_e enum. This patch replaces audfmt_e and associated values with the qapi generated AudioFormat enum. This patch is mostly a search-and-replace, except for switches where the qapi generated AUDIO_FORMAT_MAX caused problems. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 01251b2758a1679c66842120b77c0fb46d7d0eaf.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/audio/cs4231a.c')
-rw-r--r--hw/audio/cs4231a.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c
index 9089dcb..62da75e 100644
--- a/hw/audio/cs4231a.c
+++ b/hw/audio/cs4231a.c
@@ -288,7 +288,7 @@ static void cs_reset_voices (CSState *s, uint32_t val)
switch ((val >> 5) & ((s->dregs[MODE_And_ID] & MODE2) ? 7 : 3)) {
case 0:
- as.fmt = AUD_FMT_U8;
+ as.fmt = AUDIO_FORMAT_U8;
s->shift = as.nchannels == 2;
break;
@@ -298,7 +298,7 @@ static void cs_reset_voices (CSState *s, uint32_t val)
case 3:
s->tab = ALawDecompressTable;
x_law:
- as.fmt = AUD_FMT_S16;
+ as.fmt = AUDIO_FORMAT_S16;
as.endianness = AUDIO_HOST_ENDIANNESS;
s->shift = as.nchannels == 2;
break;
@@ -307,7 +307,7 @@ static void cs_reset_voices (CSState *s, uint32_t val)
as.endianness = 1;
/* fall through */
case 2:
- as.fmt = AUD_FMT_S16;
+ as.fmt = AUDIO_FORMAT_S16;
s->shift = as.nchannels;
break;