From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [patch] minimal PC speaker output
Date: Mon, 09 Jan 2006 21:40:36 +0100 [thread overview]
Message-ID: <43C2CA44.9080504@bellard.org> (raw)
In-Reply-To: <B4AD9B10-2AB9-4C82-9539-687F8EB8F3FE@gmx.de>
Hi,
I think it would not be difficult to add a real speaker emulation with
the audio API written by malc, at least to simulate tone generation
using the PIT.
Regards,
Fabrice.
Joachim Henke wrote:
> Ok, although this ugly hack has nothing to do with real PC speaker emulation,
> it's probably the most portable way to have some noise anyway. I just post
> this for people (like me) who are missing their guest operating system beeps.
> For this case the patch below is "better than nothing" (c:
>
> Greets
> Jo.
>
> --- pc.c
> +++ pc.c
> @@ -276,6 +276,11 @@
> static void speaker_ioport_write(void *opaque, uint32_t addr, uint32_t val)
> {
> + int spk_off = speaker_data_on ^ 1;
> +
> speaker_data_on = (val >> 1) & 1;
> pit_set_gate(pit, 2, val & 1);
> + /* ring terminal bell, if speaker is switched on */
> + if (spk_off & speaker_data_on)
> + puts("*beep*\a");
> }
>
>
next prev parent reply other threads:[~2006-01-09 20:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-09 19:01 [Qemu-devel] [patch] minimal PC speaker output Joachim Henke
2006-01-09 20:40 ` Fabrice Bellard [this message]
2006-01-10 9:11 ` he.jo
2006-01-18 23:05 ` [Qemu-devel] [PATCH] PC speaker emulation Joachim Henke
2006-01-18 23:32 ` [Qemu-devel] " Joachim Henke
2006-01-19 0:32 ` [Qemu-devel] " malc
2006-01-19 20:44 ` [Qemu-devel] [PATCH] PC speaker emulation (fixed) Joachim Henke
2006-01-19 23:29 ` malc
2006-01-20 9:42 ` Joachim Henke
2006-01-20 13:03 ` Johannes Schindelin
2006-01-20 12:03 ` Sebastian Kaliszewski
2006-01-23 21:10 ` [Qemu-devel] [PATCH] PC speaker emulation (fixed point) Joachim Henke
2006-01-24 12:35 ` Sebastian Kaliszewski
2006-01-24 15:50 ` Joachim Henke
2006-01-24 18:29 ` Sebastian Kaliszewski
2006-01-24 21:45 ` Fabrice Bellard
2006-01-25 0:38 ` Sebastian Kaliszewski
2006-01-25 21:54 ` [Qemu-devel] [PATCH] PC speaker emulation (square wave) Joachim Henke
2006-01-26 4:50 ` Jamie Lokier
2006-01-26 16:55 ` Sebastian Kaliszewski
2006-01-29 10:44 ` Joachim Henke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43C2CA44.9080504@bellard.org \
--to=fabrice@bellard.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.