Bug 894539 - kvm stop a guest sometimes causes host's sound playback to 'PA-PA-PA-PA-PA-PA-PA-PA-USE' for a brief moment (snd_ca0106 / SB Live! 24-bit)
Summary: kvm stop a guest sometimes causes host's sound playback to 'PA-PA-PA-PA-PA-PA...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 17
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-12 00:22 UTC by Reartes Guillermo
Modified: 2013-08-01 02:23 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-08-01 02:23:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
alsa-info txt file (10.09 KB, text/plain)
2013-02-24 22:08 UTC, Reartes Guillermo
no flags Details

Description Reartes Guillermo 2013-01-12 00:22:16 UTC
Description of problem:

Sometimes, when stopping a kvm guest the host's sound playback is affected briefly. It 'PA-PA-PA-PA-PA-PA-PA-PA-USES' then continues normally.

Version-Release number of selected component (if applicable):
F17, kernel 3.6.11-1.fc17.x86_64

How reproducible:
sometimes, rarely

Steps to Reproduce:
1. Amarok is playing mp3...
2. Pause a KVM Guest.
3. Host's sound playback 'PA-PA-PA-PA-PA-PA-PA-PA-USES'

HW: AMD FX + 990FX Chipset + SB Live! 24-Bit.

06:05.0 Multimedia audio controller [0401]: Creative Labs CA0106 Soundblaster [1102:0007]
  
Actual results:
The sound 'PA-PA-PA-PA-PA-PA-PA-PA-USES' and then continues. (Amarok)

Expected results:
stopping/starting kvm guest should not affect hosts sound playback

Additional info:

an 11 21:01:22 ulquiorra dbus-daemon[1131]: (packagekitd:27753): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Jan 11 21:07:29 ulquiorra kernel: [507607.518979] kvm [9771]: vcpu0 unhandled rdmsr: 0xc0010001
Jan 11 21:08:23 ulquiorra kernel: [507662.212252] br0: port 2(vnet0) entered disabled state
Jan 11 21:08:23 ulquiorra kernel: [507662.212497] br0: port 2(vnet0) entered disabled state
Jan 11 21:08:23 ulquiorra avahi-daemon[1065]: Withdrawing address record for fe80::fc54:ff:fe2f:d7e2 on vnet0.
Jan 11 21:08:23 ulquiorra kernel: [507662.213047] device vnet0 left promiscuous mode
Jan 11 21:08:23 ulquiorra kernel: [507662.213067] br0: port 2(vnet0) entered disabled state
Jan 11 21:08:23 ulquiorra avahi-daemon[1065]: Withdrawing workstation service for vnet0.
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c: snd_pcm_avail() returned a value that is exceptionally large: 426752 bytes (2222 ms).
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c: Most likely this is a bug in the ALSA driver 'snd_ca0106'. Please report this issue to the ALSA developers.
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c: snd_pcm_dump():
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c: Hardware PCM card 1 'CA0106' device 0 subdevice 0
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c: Its setup is:
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   stream       : PLAYBACK
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   access       : MMAP_INTERLEAVED
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   format       : S16_LE
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   subformat    : STD
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   channels     : 2
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   rate         : 48000
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   exact rate   : 48000 (48000/1)
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   msbits       : 16
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   buffer_size  : 16384
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   period_size  : 8192
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   period_time  : 170666
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   tstamp_mode  : ENABLE
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   period_step  : 1
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   avail_min    : 15425
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   period_event : 0
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   start_threshold  : -1
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   stop_threshold   : 4611686018427387904
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   silence_threshold: 0
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   silence_size : 0
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   boundary     : 4611686018427387904
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   appl_ptr     : 134584864
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   hw_ptr       : 134675168
Jan 11 21:08:37 ulquiorra dbus-daemon[1131]: dbus[1131]: [system] Activating service name='net.reactivated.Fprint' (using servicehelper)
Jan 11 21:08:37 ulquiorra dbus[1131]: [system] Activating service name='net.reactivated.Fprint' (using servicehelper)
Jan 11 21:08:37 ulquiorra dbus-daemon[1131]: Launching FprintObject

Comment 1 Reartes Guillermo 2013-02-09 22:16:47 UTC
It happened another time: (at guest shutdown)

Kernel: 3.7.4-104.fc17.x86_64

Feb  9 19:08:59 ulquiorra avahi-daemon[1084]: Withdrawing address record for fe80::fc54:ff:fe2f:d6b3 on vnet0.
Feb  9 19:08:59 ulquiorra kernel: [71659.457244] br1: port 2(vnet0) entered disabled state
Feb  9 19:08:59 ulquiorra kernel: [71659.457639] device vnet0 left promiscuous mode
Feb  9 19:08:59 ulquiorra kernel: [71659.457655] br1: port 2(vnet0) entered disabled state
Feb  9 19:08:59 ulquiorra avahi-daemon[1084]: Withdrawing workstation service for vnet0.
Feb  9 19:09:00 ulquiorra libvirtd[1392]: 2013-02-09 22:09:00.025+0000: 1392: error : qemuMonitorIO:612 : internal error End of file from monitor
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c: snd_pcm_avail() returned a value that is exceptionally large: 345120 bytes (1797 ms).
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c: Most likely this is a bug in the ALSA driver 'snd_ca0106'. Please report this issue to the ALSA developers.
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c: snd_pcm_dump():
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c: Hardware PCM card 1 'CA0106' device 0 subdevice 0
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c: Its setup is:
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   stream       : PLAYBACK
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   access       : MMAP_INTERLEAVED
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   format       : S16_LE
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   subformat    : STD
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   channels     : 2
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   rate         : 48000
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   exact rate   : 48000 (48000/1)
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   msbits       : 16
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   buffer_size  : 16384
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   period_size  : 8192
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   period_time  : 170666
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   tstamp_mode  : ENABLE
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   period_step  : 1
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   avail_min    : 16145
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   period_event : 0
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   start_threshold  : -1
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   stop_threshold   : 4611686018427387904
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   silence_threshold: 0
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   silence_size : 0
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   boundary     : 4611686018427387904
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   appl_ptr     : 489596944
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   hw_ptr       : 489666840

Comment 2 Raymond 2013-02-09 22:49:13 UTC
 appl_ptr is behind  hw_ptr (under-run) for more than 5 * buffer time




Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   appl_ptr     : 134584864
Jan 11 21:08:26 ulquiorra pulseaudio[2032]: [alsa-sink] alsa-util.c:   hw_ptr       : 134675168



Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   appl_ptr     : 489596944
Feb  9 19:09:02 ulquiorra pulseaudio[1979]: [alsa-sink] alsa-util.c:   hw_ptr       : 489666840

Comment 3 Raymond 2013-02-09 23:24:54 UTC
you have to provide pulseaudio log with debug_timing to find out why the application did not send data to pulseaudio server for more than 1.7 seconds since the buffer time of CA0106 is only 0.341 seconds

Comment 4 Reartes Guillermo 2013-02-20 18:31:31 UTC
> you have to provide pulseaudio log with debug_timing

I am not familiar with pulseaudio configuration, i added some verbosity but i don't know if it is 'debug_timing'. (I set 'loglevel' to 'debug')
 
Additional Info:

It seems that it happens with guests with a sound card, specifically F18 KDE Guest. 

Thanks in advance.

Comment 5 Raymond 2013-02-21 01:04:27 UTC
which sound card did your kvm enumlate ?

post the output of alsa-info.sh inside your vm

Comment 6 Reartes Guillermo 2013-02-24 22:08:22 UTC
Created attachment 702121 [details]
alsa-info txt file

The affected sound cards are ich6 (F18) and sb16 (XP). It happens sometimes.

I recently updated to 3.7.9-101.fc17.x86_64, so i will update this bug-report after reproducing it again.

Comment 7 Raymond 2013-02-25 12:24:55 UTC
Looking like your kvm  emulate a hda sound card 

can you post the pulseaudio log inside your vm

the emulated codec only has line in , line out without Jack detection


Codec: Generic 1af4 ID 20
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x1af40020
Subsystem Id: 0x1af40020
Revision Id: 0x100101
No Modem Function Group found
Default PCM:
    rates [0x1fc]: 16000 22050 32000 44100 48000 88200 96000
    bits [0x2]: 16
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x1d: Stereo Amp-Out
  Control: name="Master Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Master Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="HDA Generic", type="Audio", device=0
  Amp-Out caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=1
  Amp-Out vals:  [0xb6 0xb6]
  Converter: stream=8, channel=0
  PCM:
    rates [0x1fc]: 16000 22050 32000 44100 48000 88200 96000
    bits [0x2]: 16
    formats [0x1]: PCM
Node 0x03 [Pin Complex] wcaps 0x400101: Stereo
  Pincap 0x00000010: OUT
  Pin Default 0x00004010: [Jack] Line Out at Ext N/A
    Conn = Unknown, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Connection: 1
     0x02
Node 0x04 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Device: name="HDA Generic", type="Audio", device=0
  Amp-In caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=1
  Amp-In vals:  [0x4a 0x4a]
  Converter: stream=4, channel=0
  SDI-Select: 0
  PCM:
    rates [0x1fc]: 16000 22050 32000 44100 48000 88200 96000
    bits [0x2]: 16
    formats [0x1]: PCM
  Connection: 1
     0x05
Node 0x05 [Pin Complex] wcaps 0x400001: Stereo
  Pincap 0x00000020: IN
  Pin Default 0x00805020: [Jack] Line In at Ext N/A
    Conn = Unknown, Color = Red
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x20: IN

Comment 8 Raymond 2013-02-27 03:05:28 UTC
http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commitdiff;h=ec4a804792ea20f716371a0a661efc9ec15c7ff0;hp=201100656986735250ed4cd47be6b8a31c771763

old duplex mode is 0x1af40020

-#define QEMU_HDA_ID_DUPLEX  ((QEMU_HDA_ID_VENDOR << 16) | 0x20)

Comment 9 Fedora End Of Life 2013-07-03 23:34:49 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Fedora End Of Life 2013-08-01 02:23:30 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.