summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/adlib.c4
-rw-r--r--hw/es1370.c7
-rw-r--r--hw/pcspk.c4
-rw-r--r--hw/sb16.c16
4 files changed, 15 insertions, 16 deletions
diff --git a/hw/adlib.c b/hw/adlib.c
index f482d1fa84..b47bc3eece 100644
--- a/hw/adlib.c
+++ b/hw/adlib.c
@@ -301,6 +301,7 @@ int Adlib_init (AudioState *audio)
as.freq = conf.freq;
as.nchannels = SHIFT;
as.fmt = AUD_FMT_S16;
+ as.endianness = AUDIO_HOST_ENDIANNESS;
AUD_register_card (audio, "adlib", &s->card);
@@ -310,8 +311,7 @@ int Adlib_init (AudioState *audio)
"adlib",
s,
adlib_callback,
- &as,
- 0 /* XXX: little endian? */
+ &as
);
if (!s->voice) {
Adlib_fini (s);
diff --git a/hw/es1370.c b/hw/es1370.c
index 2aa2db9eb7..0d2d861166 100644
--- a/hw/es1370.c
+++ b/hw/es1370.c
@@ -423,6 +423,7 @@ static void es1370_update_voices (ES1370State *s, uint32_t ctl, uint32_t sctl)
as.freq = new_freq;
as.nchannels = 1 << (new_fmt & 1);
as.fmt = (new_fmt & 2) ? AUD_FMT_S16 : AUD_FMT_U8;
+ as.endianness = 0;
if (i == ADC_CHANNEL) {
s->adc_voice =
@@ -432,8 +433,7 @@ static void es1370_update_voices (ES1370State *s, uint32_t ctl, uint32_t sctl)
"es1370.adc",
s,
es1370_adc_callback,
- &as,
- 0 /* little endian */
+ &as
);
}
else {
@@ -444,8 +444,7 @@ static void es1370_update_voices (ES1370State *s, uint32_t ctl, uint32_t sctl)
i ? "es1370.dac2" : "es1370.dac1",
s,
i ? es1370_dac2_callback : es1370_dac1_callback,
- &as,
- 0 /* litle endian */
+ &as
);
}
}
diff --git a/hw/pcspk.c b/hw/pcspk.c
index 2e30662a25..0d52b31b45 100644
--- a/hw/pcspk.c
+++ b/hw/pcspk.c
@@ -95,7 +95,7 @@ static void pcspk_callback(void *opaque, int free)
int pcspk_audio_init(AudioState *audio)
{
PCSpkState *s = &pcspk_state;
- audsettings_t as = {PCSPK_SAMPLE_RATE, 1, AUD_FMT_U8};
+ audsettings_t as = {PCSPK_SAMPLE_RATE, 1, AUD_FMT_U8, 0};
if (!audio) {
AUD_log(s_spk, "No audio state\n");
@@ -103,7 +103,7 @@ int pcspk_audio_init(AudioState *audio)
}
AUD_register_card(audio, s_spk, &s->card);
- s->voice = AUD_open_out(&s->card, s->voice, s_spk, s, pcspk_callback, &as, 0);
+ s->voice = AUD_open_out(&s->card, s->voice, s_spk, s, pcspk_callback, &as);
if (!s->voice) {
AUD_log(s_spk, "Could not open voice\n");
return -1;
diff --git a/hw/sb16.c b/hw/sb16.c
index 6443a90d03..04325ac031 100644
--- a/hw/sb16.c
+++ b/hw/sb16.c
@@ -203,6 +203,7 @@ static void continue_dma8 (SB16State *s)
as.freq = s->freq;
as.nchannels = 1 << s->fmt_stereo;
as.fmt = s->fmt;
+ as.endianness = 0;
s->voice = AUD_open_out (
&s->card,
@@ -210,8 +211,7 @@ static void continue_dma8 (SB16State *s)
"sb16",
s,
SB_audio_callback,
- &as,
- 0 /* little endian */
+ &as
);
}
@@ -348,6 +348,7 @@ static void dma_cmd (SB16State *s, uint8_t cmd, uint8_t d0, int dma_len)
as.freq = s->freq;
as.nchannels = 1 << s->fmt_stereo;
as.fmt = s->fmt;
+ as.endianness = 0;
s->voice = AUD_open_out (
&s->card,
@@ -355,8 +356,7 @@ static void dma_cmd (SB16State *s, uint8_t cmd, uint8_t d0, int dma_len)
"sb16",
s,
SB_audio_callback,
- &as,
- 0 /* little endian */
+ &as
);
}
@@ -838,6 +838,7 @@ static void legacy_reset (SB16State *s)
as.freq = s->freq;
as.nchannels = 1;
as.fmt = AUD_FMT_U8;
+ as.endianness = 0;
s->voice = AUD_open_out (
&s->card,
@@ -845,8 +846,7 @@ static void legacy_reset (SB16State *s)
"sb16",
s,
SB_audio_callback,
- &as,
- 0 /* little endian */
+ &as
);
/* Not sure about that... */
@@ -1371,6 +1371,7 @@ static int SB_load (QEMUFile *f, void *opaque, int version_id)
as.freq = s->freq;
as.nchannels = 1 << s->fmt_stereo;
as.fmt = s->fmt;
+ as.endianness = 0;
s->voice = AUD_open_out (
&s->card,
@@ -1378,8 +1379,7 @@ static int SB_load (QEMUFile *f, void *opaque, int version_id)
"sb16",
s,
SB_audio_callback,
- &as,
- 0 /* little endian */
+ &as
);
}