public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] Re: Question about KVM and PC speaker
       [not found]           ` <49F03A00.8060502@redhat.com>
@ 2009-04-23 10:29             ` Jan Kiszka
  2009-04-23 11:09               ` Avi Kivity
  2009-05-04 16:34               ` Simon Bienlein
  0 siblings, 2 replies; 21+ messages in thread
From: Jan Kiszka @ 2009-04-23 10:29 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Samuel Thibault, Simon Bienlein, Qemu-devel, kvm-devel

Avi Kivity wrote:
> Jan Kiszka wrote:
>> Huh, it is! Then the problem is a KVM-only thing: The kernel part hooks
>> onto those resources but doesn't communicate changes to this user space
>> backend.
>>   
> 
> In this case, the -no-kvm-pit option should help.

Probably fine in many cases (where the PIT is no longer used anyway),
just a bit unintuitive for users.

I wonder why KVM moved port 0x61 handling into kernel space at all. By
leaving it in pcspk hands and extending the latter to sync with the
in-kernel PIT on sample generation, this speaker regression (of
kvm-userspace) should have been avoidable.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-04-23 10:29             ` [Qemu-devel] Re: Question about KVM and PC speaker Jan Kiszka
@ 2009-04-23 11:09               ` Avi Kivity
  2009-04-23 17:42                 ` Jan Kiszka
  2009-05-04 16:34               ` Simon Bienlein
  1 sibling, 1 reply; 21+ messages in thread
From: Avi Kivity @ 2009-04-23 11:09 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Samuel Thibault, Simon Bienlein, Qemu-devel, kvm-devel

Jan Kiszka wrote:
> Avi Kivity wrote:
>   
>> Jan Kiszka wrote:
>>     
>>> Huh, it is! Then the problem is a KVM-only thing: The kernel part hooks
>>> onto those resources but doesn't communicate changes to this user space
>>> backend.
>>>   
>>>       
>> In this case, the -no-kvm-pit option should help.
>>     
>
> Probably fine in many cases (where the PIT is no longer used anyway),
> just a bit unintuitive for users.
>   

Yes, it's only a workaround.

> I wonder why KVM moved port 0x61 handling into kernel space at all. By
> leaving it in pcspk hands and extending the latter to sync with the
> in-kernel PIT on sample generation, this speaker regression (of
> kvm-userspace) should have been avoidable.
>   

I'd rather not have partial components in the kernel.  This case is 
particularly icky though.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-04-23 11:09               ` Avi Kivity
@ 2009-04-23 17:42                 ` Jan Kiszka
  0 siblings, 0 replies; 21+ messages in thread
From: Jan Kiszka @ 2009-04-23 17:42 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Samuel Thibault, Simon Bienlein, Qemu-devel, kvm-devel

Avi Kivity wrote:
> Jan Kiszka wrote:
>> Avi Kivity wrote:
>>  
>>> Jan Kiszka wrote:
>>>    
>>>> Huh, it is! Then the problem is a KVM-only thing: The kernel part hooks
>>>> onto those resources but doesn't communicate changes to this user space
>>>> backend.
>>>>         
>>> In this case, the -no-kvm-pit option should help.
>>>     
>>
>> Probably fine in many cases (where the PIT is no longer used anyway),
>> just a bit unintuitive for users.
>>   
> 
> Yes, it's only a workaround.
> 
>> I wonder why KVM moved port 0x61 handling into kernel space at all. By
>> leaving it in pcspk hands and extending the latter to sync with the
>> in-kernel PIT on sample generation, this speaker regression (of
>> kvm-userspace) should have been avoidable.
>>   
> 
> I'd rather not have partial components in the kernel.  This case is
> particularly icky though.

But you surely don't want to issue the sound from kernel space.
Moreover, these are separate components: the PIT doesn't bother about
the speaker, if it's on or off. We just need to make pcspk KVM-aware. I
think I will post a patch later today.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-04-23 10:29             ` [Qemu-devel] Re: Question about KVM and PC speaker Jan Kiszka
  2009-04-23 11:09               ` Avi Kivity
@ 2009-05-04 16:34               ` Simon Bienlein
  2009-05-04 20:29                 ` Jan Kiszka
  1 sibling, 1 reply; 21+ messages in thread
From: Simon Bienlein @ 2009-05-04 16:34 UTC (permalink / raw)
  Cc: Qemu-devel, kvm-devel

Hello Jan,

thank you very much for processing my request.
I [1]patched the KVM sources from Lenny and created a new Debian packet. 
When I boot the VM from the Lenny CD, there is no audible signal tone.
It does not make a difference whether I start the KVM with or without 
the option -no-kvm-pit. What do I have to do in order to test the new 
function?

Thanks in advance for the further help.

Simon

1. <http://patchwork.kernel.org/patch/19687/>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-04 16:34               ` Simon Bienlein
@ 2009-05-04 20:29                 ` Jan Kiszka
  2009-05-04 20:56                   ` Samuel Thibault
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Kiszka @ 2009-05-04 20:29 UTC (permalink / raw)
  To: Simon Bienlein; +Cc: Qemu-devel, kvm-devel

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

Simon Bienlein wrote:
> Hello Jan,
> 
> thank you very much for processing my request.
> I [1]patched the KVM sources from Lenny and created a new Debian packet.

Did you patch both kernel and user space? Note that my kernel patch was
against the kernel git repository, not against the external modules
delivered with kvm releases. Feasible to convert them, but maybe not
straightforward.

> When I boot the VM from the Lenny CD, there is no audible signal tone.
> It does not make a difference whether I start the KVM with or without
> the option -no-kvm-pit. What do I have to do in order to test the new
> function?

Hmm, I successfully tested with '-soundbw pcspk' + my patches or
-no-kvm-pit. There is probably a different, unrelated issue with your setup.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Re: Question about KVM and PC speaker
  2009-05-04 20:29                 ` Jan Kiszka
@ 2009-05-04 20:56                   ` Samuel Thibault
  2009-05-04 21:00                     ` [Qemu-devel] " Jan Kiszka
  0 siblings, 1 reply; 21+ messages in thread
From: Samuel Thibault @ 2009-05-04 20:56 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Simon Bienlein, Qemu-devel, kvm-devel

Jan Kiszka, le Mon 04 May 2009 22:29:39 +0200, a écrit :
> > When I boot the VM from the Lenny CD, there is no audible signal tone.
> 
> Hmm, I successfully tested with '-soundbw pcspk' + my patches or
> -no-kvm-pit. There is probably a different, unrelated issue with your setup.

Remember that the BIOS support for beeps is probably still missing.
Simon, you should also test beeps from an installed Linux guest.

Samuel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-04 20:56                   ` Samuel Thibault
@ 2009-05-04 21:00                     ` Jan Kiszka
  2009-05-05 15:59                       ` Simon Bienlein
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Kiszka @ 2009-05-04 21:00 UTC (permalink / raw)
  To: Samuel Thibault, Jan Kiszka, Simon Bienlein, Qemu-devel,
	kvm-devel

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

Samuel Thibault wrote:
> Jan Kiszka, le Mon 04 May 2009 22:29:39 +0200, a écrit :
>>> When I boot the VM from the Lenny CD, there is no audible signal tone.
>> Hmm, I successfully tested with '-soundbw pcspk' + my patches or
>> -no-kvm-pit. There is probably a different, unrelated issue with your setup.
> 
> Remember that the BIOS support for beeps is probably still missing.
> Simon, you should also test beeps from an installed Linux guest.
> 

Yeah, I forgot... :)

Indeed, I only tested the console beep of a fully installed Linux guest.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-04 21:00                     ` [Qemu-devel] " Jan Kiszka
@ 2009-05-05 15:59                       ` Simon Bienlein
  2009-05-05 22:34                         ` Sebastian Herbszt
  0 siblings, 1 reply; 21+ messages in thread
From: Simon Bienlein @ 2009-05-05 15:59 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Qemu-devel, kvm-devel

Hello Jan,
Am 04.05.2009 23:00, schrieb Jan Kiszka:
> Samuel Thibault wrote:
>>  Jan Kiszka, le Mon 04 May 2009 22:29:39 +0200, a écrit :
>>>>  When I boot the VM from the Lenny CD, there is no audible signal tone.
>>>  Hmm, I successfully tested with '-soundbw pcspk' + my patches or
>>>  -no-kvm-pit. There is probably a different, unrelated issue with your setup.
>>
>>  Remember that the BIOS support for beeps is probably still missing.
>>  Simon, you should also test beeps from an installed Linux guest.
>>
>
> Yeah, I forgot... :)
>
> Indeed, I only tested the console beep of a fully installed Linux guest.

In this surrounding, the beep works fine at my place at well. However, 
the beep worked without the patching of the sources when I entered 
-no-kvm-pit. For me as a user there is no noticeable change with the patch.

Is a support for BIOS worked on right now?

Thanks in advance for the further help.

Simon

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-05 15:59                       ` Simon Bienlein
@ 2009-05-05 22:34                         ` Sebastian Herbszt
  2009-05-06 10:34                           ` Jan Kiszka
  0 siblings, 1 reply; 21+ messages in thread
From: Sebastian Herbszt @ 2009-05-05 22:34 UTC (permalink / raw)
  To: Simon Bienlein, Volker Ruppert; +Cc: Qemu-devel, kvm

Simon Bienlein wrote:
> Is a support for BIOS worked on right now?

The vgabios (vgabios.c) has a "FIXME should beep". Volker, do you plan to fix this?

Which frequency should be used for the beep? Which delay?
Getting a delay using "inb(0x61) & 0x10" is still a no go on qemu, right?

- Sebastian


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-05 22:34                         ` Sebastian Herbszt
@ 2009-05-06 10:34                           ` Jan Kiszka
  2009-05-06 20:55                             ` Sebastian Herbszt
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Kiszka @ 2009-05-06 10:34 UTC (permalink / raw)
  To: Sebastian Herbszt; +Cc: Simon Bienlein, Volker Ruppert, Qemu-devel, kvm

Sebastian Herbszt wrote:
> Simon Bienlein wrote:
>> Is a support for BIOS worked on right now?
> 
> The vgabios (vgabios.c) has a "FIXME should beep". Volker, do you plan
> to fix this?
> 
> Which frequency should be used for the beep? Which delay?

I would try 1 KHz and some hundred milliseconds.

> Getting a delay using "inb(0x61) & 0x10" is still a no go on qemu, right?

Looks like (should be far too inaccurate for longer delays). What about
0x40:0x6c, the BIOS' daily timer counter?

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-06 10:34                           ` Jan Kiszka
@ 2009-05-06 20:55                             ` Sebastian Herbszt
  2009-05-07  8:12                               ` Jan Kiszka
  0 siblings, 1 reply; 21+ messages in thread
From: Sebastian Herbszt @ 2009-05-06 20:55 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Simon Bienlein, Volker Ruppert, Qemu-devel, kvm

Jan Kiszka wrote:
> Sebastian Herbszt wrote:
>> Simon Bienlein wrote:
>>> Is a support for BIOS worked on right now?
>> 
>> The vgabios (vgabios.c) has a "FIXME should beep". Volker, do you plan
>> to fix this?
>> 
>> Which frequency should be used for the beep? Which delay?
> 
> I would try 1 KHz and some hundred milliseconds.

I just looked at some vga bios and it uses about 896,45 Hz.

>> Getting a delay using "inb(0x61) & 0x10" is still a no go on qemu, right?
> 
> Looks like (should be far too inaccurate for longer delays). What about
> 0x40:0x6c, the BIOS' daily timer counter?

The bios i looked at used the refresh request port 0x61. This is supported by bochs and
there is also a patch for qemu to replace the dummy [1]. The rombios uses this to provide
INT 15h AH=86h functionality; this is likely broken with the dummy code in qemu.

Anyway, using "timer ticks since midnight" should be possible (INT 08h handler is set up
before vga bios is called).

[1] http://article.gmane.org/gmane.comp.emulators.bochs.devel/7594

- Sebastian


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-06 20:55                             ` Sebastian Herbszt
@ 2009-05-07  8:12                               ` Jan Kiszka
  2009-05-09 22:21                                 ` Sebastian Herbszt
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Kiszka @ 2009-05-07  8:12 UTC (permalink / raw)
  To: Sebastian Herbszt; +Cc: Simon Bienlein, Volker Ruppert, Qemu-devel, kvm

Sebastian Herbszt wrote:
> Jan Kiszka wrote:
>> Sebastian Herbszt wrote:
>>> Simon Bienlein wrote:
>>>> Is a support for BIOS worked on right now?
>>>
>>> The vgabios (vgabios.c) has a "FIXME should beep". Volker, do you plan
>>> to fix this?
>>>
>>> Which frequency should be used for the beep? Which delay?
>>
>> I would try 1 KHz and some hundred milliseconds.
> 
> I just looked at some vga bios and it uses about 896,45 Hz.
> 
>>> Getting a delay using "inb(0x61) & 0x10" is still a no go on qemu,
>>> right?
>>
>> Looks like (should be far too inaccurate for longer delays). What about
>> 0x40:0x6c, the BIOS' daily timer counter?
> 
> The bios i looked at used the refresh request port 0x61. This is
> supported by bochs and
> there is also a patch for qemu to replace the dummy [1]. The rombios
> uses this to provide
> INT 15h AH=86h functionality; this is likely broken with the dummy code
> in qemu.

I see no problem with improving qemu's emulation accuracy this way a
bit. But I wouldn't built new delay implementations on top of it,
specifically if the code is in fact aware of running over a hypervisor.
Such micro-timings are far too inaccurate for longer delays in an
environment where you cannot be sure of running all the time during that
period.

> 
> Anyway, using "timer ticks since midnight" should be possible (INT 08h
> handler is set up
> before vga bios is called).
> 
> [1] http://article.gmane.org/gmane.comp.emulators.bochs.devel/7594
> 
> - Sebastian
> 

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-07  8:12                               ` Jan Kiszka
@ 2009-05-09 22:21                                 ` Sebastian Herbszt
  2009-05-12  7:32                                   ` Jan Kiszka
  0 siblings, 1 reply; 21+ messages in thread
From: Sebastian Herbszt @ 2009-05-09 22:21 UTC (permalink / raw)
  To: Jan Kiszka, Volker Ruppert; +Cc: Simon Bienlein, Qemu-devel, kvm

Jan Kiszka wrote:
> Sebastian Herbszt wrote:
>> Jan Kiszka wrote:
>>> Sebastian Herbszt wrote:
>>>> Simon Bienlein wrote:
>>>>> Is a support for BIOS worked on right now?
>>>>
>>>> The vgabios (vgabios.c) has a "FIXME should beep". Volker, do you plan
>>>> to fix this?
>>>>
>>>> Which frequency should be used for the beep? Which delay?
>>>
>>> I would try 1 KHz and some hundred milliseconds.
>> 
>> I just looked at some vga bios and it uses about 896,45 Hz.
>> 
>>>> Getting a delay using "inb(0x61) & 0x10" is still a no go on qemu,
>>>> right?
>>>
>>> Looks like (should be far too inaccurate for longer delays). What about
>>> 0x40:0x6c, the BIOS' daily timer counter?
>> 
>> The bios i looked at used the refresh request port 0x61. This is
>> supported by bochs and
>> there is also a patch for qemu to replace the dummy [1]. The rombios
>> uses this to provide
>> INT 15h AH=86h functionality; this is likely broken with the dummy code
>> in qemu.
> 
> I see no problem with improving qemu's emulation accuracy this way a
> bit. But I wouldn't built new delay implementations on top of it,
> specifically if the code is in fact aware of running over a hypervisor.
> Such micro-timings are far too inaccurate for longer delays in an
> environment where you cannot be sure of running all the time during that
> period.

Volker, mind to resubmit the patch once again?
 
>> Anyway, using "timer ticks since midnight" should be possible (INT 08h
>> handler is set up
>> before vga bios is called).

I have implemented the beep for vgabios-6b and it works on bochs but fails on qemu.
With "-soundhw pcspk" i should hear it thru the hosts pc speaker, right?

- Sebastian


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-09 22:21                                 ` Sebastian Herbszt
@ 2009-05-12  7:32                                   ` Jan Kiszka
  2009-05-12 21:06                                     ` Sebastian Herbszt
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Kiszka @ 2009-05-12  7:32 UTC (permalink / raw)
  To: Sebastian Herbszt; +Cc: Volker Ruppert, Simon Bienlein, Qemu-devel, kvm

[-- Attachment #1: Type: text/plain, Size: 485 bytes --]

Sebastian Herbszt wrote:
> Jan Kiszka wrote:
>> Sebastian Herbszt wrote:
>>> Anyway, using "timer ticks since midnight" should be possible (INT 08h
>>> handler is set up
>>> before vga bios is called).
> 
> I have implemented the beep for vgabios-6b and it works on bochs but
> fails on qemu.
> With "-soundhw pcspk" i should hear it thru the hosts pc speaker, right?

Yep, that's how it should work. Mind to share your code and tell us
which test case you used?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-12  7:32                                   ` Jan Kiszka
@ 2009-05-12 21:06                                     ` Sebastian Herbszt
  2009-05-12 21:50                                       ` Jan Kiszka
  0 siblings, 1 reply; 21+ messages in thread
From: Sebastian Herbszt @ 2009-05-12 21:06 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Volker Ruppert, Simon Bienlein, Qemu-devel, kvm

Jan Kiszka wrote:
>> I have implemented the beep for vgabios-6b and it works on bochs but
>> fails on qemu.
>> With "-soundhw pcspk" i should hear it thru the hosts pc speaker, right?
> 
> Yep, that's how it should work. Mind to share your code and tell us
> which test case you used?

FreeDOS floppy with "debug" command and assembly code:
mov ax,0e07
xor bx,bx
int 10

With the modified vgabios (see below) it does beep on bochs on vista,
but not on qemu.

- Sebastian

--- vgabios.c.orig 2009-05-12 22:24:22.000000000 +0200
+++ vgabios.c 2009-05-12 22:24:32.000000000 +0200
@@ -80,6 +80,9 @@
 static void memcpyb();
 static void memcpyw();
 
+static void delay_ticks();
+static void beep();
+
 static void biosfn_set_video_mode();
 static void biosfn_set_cursor_shape();
 static void biosfn_set_cursor_pos();
@@ -1965,7 +1968,7 @@
  switch(car)
   {
    case 7:
-    //FIXME should beep
+    beep();
     break;
 
    case 8:
@@ -3765,6 +3768,57 @@
 ASM_END
 }
 
+  void
+delay_ticks(ticks)
+  Bit16u ticks;
+{
+ASM_START
+  pusha
+  push ds
+  xor dx,dx
+  mov ds,dx
+  mov cx,4[bp]
+  add cx,0x46c
+  adc dx,0x46e
+  sti
+delay_ticks_wait:
+  hlt
+  mov ax,0x46c
+  mov bx,0x46e
+  cmp dx,bx
+  jb delay_ticks_out
+  cmp cx,ax
+  ja delay_ticks_wait
+delay_ticks_out:
+  pop ds
+  popa
+ASM_END
+}
+
+void beep()
+{
+ASM_START
+  pusha
+  mov al,#0xb6
+  out #0x43,al
+  mov al,#0x33
+  out #0x42,al
+  mov al,#0x5
+  out #0x42,al
+  in al,#0x61
+  push ax
+  or al,#0x03
+  out #0x61,al
+  mov cx,#0x4
+  push cx
+  call _delay_ticks
+  pop cx
+  pop ax
+  out #0x61,al
+  popa
+ASM_END
+}
+
 #ifdef DEBUG
 void unimplemented()
 {


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-12 21:06                                     ` Sebastian Herbszt
@ 2009-05-12 21:50                                       ` Jan Kiszka
  2009-05-12 22:21                                         ` Sebastian Herbszt
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Kiszka @ 2009-05-12 21:50 UTC (permalink / raw)
  To: Sebastian Herbszt; +Cc: Volker Ruppert, Simon Bienlein, Qemu-devel, kvm

[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]

Sebastian Herbszt wrote:
> Jan Kiszka wrote:
>>> I have implemented the beep for vgabios-6b and it works on bochs but
>>> fails on qemu.
>>> With "-soundhw pcspk" i should hear it thru the hosts pc speaker, right?
>>
>> Yep, that's how it should work. Mind to share your code and tell us
>> which test case you used?
> 
> FreeDOS floppy with "debug" command and assembly code:
> mov ax,0e07
> xor bx,bx
> int 10
> 
> With the modified vgabios (see below) it does beep on bochs on vista,
> but not on qemu.

Works fine for me!

Did you check twice that your modified vgabios is actually loaded by
qemu (e.g. via strace)? Moreover, does sound work at all with your qemu?
The image I tried [1] issues two beeps after loading (obviously via
direct hw access) - a good way to check general support. Note that one
reason for broken host sound with qemu can be OSS. For that reason I
always configure my qemu with --audio-drv-list=alsa.

Jan

PS: Your patch was mangled by your mail client. Fortunately, it was
small enough for manual fixing.

[1]http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/unofficial/balder/balder10.img


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-12 21:50                                       ` Jan Kiszka
@ 2009-05-12 22:21                                         ` Sebastian Herbszt
  2009-05-12 22:27                                           ` Samuel Thibault
  2009-05-12 22:37                                           ` malc
  0 siblings, 2 replies; 21+ messages in thread
From: Sebastian Herbszt @ 2009-05-12 22:21 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Volker Ruppert, Simon Bienlein, Qemu-devel, kvm

Jan Kiszka wrote:
> Sebastian Herbszt wrote:
>> With the modified vgabios (see below) it does beep on bochs on vista,
>> but not on qemu.
> 
> Works fine for me!
> 
> Did you check twice that your modified vgabios is actually loaded by
> qemu (e.g. via strace)?

Yes, it uses the right rom.

> Moreover, does sound work at all with your qemu?
> The image I tried [1] issues two beeps after loading (obviously via
> direct hw access) - a good way to check general support. Note that one
> reason for broken host sound with qemu can be OSS. For that reason I
> always configure my qemu with --audio-drv-list=alsa.

Thats a good hint :)
Seems i used to compile qemu without "--audio-drv-list". Since "dsound" and
"fmod" drivers don't compile here (i likely miss some libs in my mingw), i used "sdl".
Now i can hear those two beeps with the image you suggested. Tho those are coming
thru my sound card and not the hosts pc speaker (even with "-soundhw pcspk", but maybe
that option means something different).
With INT 10h AH=0Eh i now can hear a beep too, but it doesn't stop and qemu somewhat freezes.

> Jan
> 
> PS: Your patch was mangled by your mail client. Fortunately, it was
> small enough for manual fixing.

Unfortunatelly Windows Mail tends to do this and i failed to find an option to fix it.

- Sebastian


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-12 22:21                                         ` Sebastian Herbszt
@ 2009-05-12 22:27                                           ` Samuel Thibault
  2009-05-12 22:37                                           ` malc
  1 sibling, 0 replies; 21+ messages in thread
From: Samuel Thibault @ 2009-05-12 22:27 UTC (permalink / raw)
  To: Sebastian Herbszt; +Cc: Jan Kiszka, Qemu-devel, kvm, Simon Bienlein

Sebastian Herbszt, le Wed 13 May 2009 00:21:25 +0200, a écrit :
> Tho those are coming thru my sound card and not the hosts pc speaker
> (even with "-soundhw pcspk", but maybe that option means something
> different).

-soundhw pcspk means to emulate the PC speaker for the guest, it doesn't
have to do with how it is rendered by the host.

> >PS: Your patch was mangled by your mail client. Fortunately, it was
> >small enough for manual fixing.
> 
> Unfortunatelly Windows Mail tends to do this and i failed to find an option 
> to fix it.

Then change your mail client :)

Samuel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Re: Question about KVM and PC speaker
  2009-05-12 22:21                                         ` Sebastian Herbszt
  2009-05-12 22:27                                           ` Samuel Thibault
@ 2009-05-12 22:37                                           ` malc
  2009-05-14 19:48                                             ` [Qemu-devel] " Sebastian Herbszt
  1 sibling, 1 reply; 21+ messages in thread
From: malc @ 2009-05-12 22:37 UTC (permalink / raw)
  To: Sebastian Herbszt; +Cc: Jan Kiszka, Qemu-devel, kvm, Simon Bienlein

On Wed, 13 May 2009, Sebastian Herbszt wrote:

> Jan Kiszka wrote:
> > Sebastian Herbszt wrote:
> > > With the modified vgabios (see below) it does beep on bochs on vista,
> > > but not on qemu.
> > 
> > Works fine for me!
> > 
> > Did you check twice that your modified vgabios is actually loaded by
> > qemu (e.g. via strace)?
> 
> Yes, it uses the right rom.
> 
> > Moreover, does sound work at all with your qemu?
> > The image I tried [1] issues two beeps after loading (obviously via
> > direct hw access) - a good way to check general support. Note that one
> > reason for broken host sound with qemu can be OSS. For that reason I
> > always configure my qemu with --audio-drv-list=alsa.
> 
> Thats a good hint :)
> Seems i used to compile qemu without "--audio-drv-list". Since "dsound" and
> "fmod" drivers don't compile here (i likely miss some libs in my mingw), i
> used "sdl".

Don't do that. Here's a nice tutorial Kazu made that will probably help 
you: http://www.h7.dion.ne.jp/~qemu-win/Audio-en.html

> Now i can hear those two beeps with the image you suggested. Tho those are
> coming
> thru my sound card and not the hosts pc speaker (even with "-soundhw pcspk",
> but maybe
> that option means something different).

And it will always come through your soundcard. pcspk is not a passthrough
thing.

> With INT 10h AH=0Eh i now can hear a beep too, but it doesn't stop and qemu
> somewhat freezes.

Huh?

> > Jan
> > 
> > PS: Your patch was mangled by your mail client. Fortunately, it was
> > small enough for manual fixing.
> 
> Unfortunatelly Windows Mail tends to do this and i failed to find an option to
> fix it.
> 
> - Sebastian
> 
> 
> 

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-12 22:37                                           ` malc
@ 2009-05-14 19:48                                             ` Sebastian Herbszt
  2009-05-14 22:01                                               ` malc
  0 siblings, 1 reply; 21+ messages in thread
From: Sebastian Herbszt @ 2009-05-14 19:48 UTC (permalink / raw)
  To: malc; +Cc: Jan Kiszka, Qemu-devel, kvm, Simon Bienlein

malc wrote:
> On Wed, 13 May 2009, Sebastian Herbszt wrote:
> 
>> Jan Kiszka wrote:
>> > Moreover, does sound work at all with your qemu?
>> > The image I tried [1] issues two beeps after loading (obviously via
>> > direct hw access) - a good way to check general support. Note that one
>> > reason for broken host sound with qemu can be OSS. For that reason I
>> > always configure my qemu with --audio-drv-list=alsa.
>> 
>> Thats a good hint :)
>> Seems i used to compile qemu without "--audio-drv-list". Since "dsound" and
>> "fmod" drivers don't compile here (i likely miss some libs in my mingw), i
>> used "sdl".
> 
> Don't do that. Here's a nice tutorial Kazu made that will probably help 
> you: http://www.h7.dion.ne.jp/~qemu-win/Audio-en.html

So you're saying the use of sdl for audio is not recommended?

>> Now i can hear those two beeps with the image you suggested. Tho those are
>> coming
>> thru my sound card and not the hosts pc speaker (even with "-soundhw pcspk",
>> but maybe
>> that option means something different).
> 
> And it will always come through your soundcard. pcspk is not a passthrough
> thing.

Thanks for the clarification.

 >> With INT 10h AH=0Eh i now can hear a beep too, but it doesn't stop and qemu
>> somewhat freezes.
> 
> Huh?

With this INT 10h function qemu should beep once, but it does loop the beep infinitely.
Normally i can exit qemu by clicking on the [x] window close "icon", but while it does
endlessly beep that doesn't work (vista says process doesn't respond). Using "quit" in the
monitor window doesn't work either.

- Sebastian


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] Re: Question about KVM and PC speaker
  2009-05-14 19:48                                             ` [Qemu-devel] " Sebastian Herbszt
@ 2009-05-14 22:01                                               ` malc
  0 siblings, 0 replies; 21+ messages in thread
From: malc @ 2009-05-14 22:01 UTC (permalink / raw)
  To: Sebastian Herbszt; +Cc: Jan Kiszka, Qemu-devel, kvm, Simon Bienlein

On Thu, 14 May 2009, Sebastian Herbszt wrote:

> malc wrote:
> > On Wed, 13 May 2009, Sebastian Herbszt wrote:
> > 
> > > Jan Kiszka wrote:
> > > > Moreover, does sound work at all with your qemu?
> > > > The image I tried [1] issues two beeps after loading (obviously via
> > > > direct hw access) - a good way to check general support. Note that one
> > > > reason for broken host sound with qemu can be OSS. For that reason I
> > > > always configure my qemu with --audio-drv-list=alsa.
> > > 
> > > Thats a good hint :)
> > > Seems i used to compile qemu without "--audio-drv-list". Since "dsound"
> > > and
> > > "fmod" drivers don't compile here (i likely miss some libs in my mingw), i
> > > used "sdl".
> > 
> > Don't do that. Here's a nice tutorial Kazu made that will probably help you:
> > http://www.h7.dion.ne.jp/~qemu-win/Audio-en.html
> 
> So you're saying the use of sdl for audio is not recommended?

Yes.

> 
> > > Now i can hear those two beeps with the image you suggested. Tho those are
> > > coming
> > > thru my sound card and not the hosts pc speaker (even with "-soundhw
> > > pcspk",
> > > but maybe
> > > that option means something different).
> > 
> > And it will always come through your soundcard. pcspk is not a passthrough
> > thing.
> 
> Thanks for the clarification.
> 
> >> With INT 10h AH=0Eh i now can hear a beep too, but it doesn't stop and qemu
> > > somewhat freezes.
> > 
> > Huh?
> 
> With this INT 10h function qemu should beep once, but it does loop the beep
> infinitely.
> Normally i can exit qemu by clicking on the [x] window close "icon", but while
> it does
> endlessly beep that doesn't work (vista says process doesn't respond). Using
> "quit" in the
> monitor window doesn't work either.
> 

Can you post some .com file sparing me from writing the code for one
myself?

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2009-05-14 22:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <49EF69BC.90300@gmx.de>
     [not found] ` <49F01C8D.1010203@web.de>
     [not found]   ` <20090423083252.GB5277@const.bordeaux.inria.fr>
     [not found]     ` <49F031C2.5000204@siemens.com>
     [not found]       ` <20090423092546.GF5277@const.bordeaux.inria.fr>
     [not found]         ` <49F035E7.5080906@siemens.com>
     [not found]           ` <49F03A00.8060502@redhat.com>
2009-04-23 10:29             ` [Qemu-devel] Re: Question about KVM and PC speaker Jan Kiszka
2009-04-23 11:09               ` Avi Kivity
2009-04-23 17:42                 ` Jan Kiszka
2009-05-04 16:34               ` Simon Bienlein
2009-05-04 20:29                 ` Jan Kiszka
2009-05-04 20:56                   ` Samuel Thibault
2009-05-04 21:00                     ` [Qemu-devel] " Jan Kiszka
2009-05-05 15:59                       ` Simon Bienlein
2009-05-05 22:34                         ` Sebastian Herbszt
2009-05-06 10:34                           ` Jan Kiszka
2009-05-06 20:55                             ` Sebastian Herbszt
2009-05-07  8:12                               ` Jan Kiszka
2009-05-09 22:21                                 ` Sebastian Herbszt
2009-05-12  7:32                                   ` Jan Kiszka
2009-05-12 21:06                                     ` Sebastian Herbszt
2009-05-12 21:50                                       ` Jan Kiszka
2009-05-12 22:21                                         ` Sebastian Herbszt
2009-05-12 22:27                                           ` Samuel Thibault
2009-05-12 22:37                                           ` malc
2009-05-14 19:48                                             ` [Qemu-devel] " Sebastian Herbszt
2009-05-14 22:01                                               ` malc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox