lkml.org 
[lkml]   [2010]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.36: Sound stop working
At Thu, 12 Aug 2010 23:24:43 +0200,
Jiri Slaby wrote:
>
> On 08/12/2010 11:18 PM, Linus Torvalds wrote:
> > On Thu, Aug 12, 2010 at 2:01 PM, Jiri Slaby <jirislaby@gmail.com> wrote:
> >> Probably I got into this problem yesterday. Found out that PA fails to
> >> open /dev/snd/pcmC0D0p _second_ time. It opens it, then closes, then
> >> opens it again and gets EBUSY. aplay is OK.
>
> Perfectly reproducible in qemu-kvm with ac97 soundhw, i.e. intel8x0
> driver. Just in case you want to debug that easily.

And the below is a minimal test case to simulate the situation
PulseAudio does.


Takashi

===

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/inotify.h>
#include <unistd.h>

int main()
{
int fd;

inotify_add_watch(inotify_init(), "/dev/snd", IN_CLOSE_WRITE);

fd = open("/dev/snd/pcmC0D0p", O_RDWR | O_NONBLOCK);
if (fd < 0)
perror("open1");
else
close(fd);
fd = open("/dev/snd/pcmC0D0p", O_RDWR | O_NONBLOCK);
if (fd < 0)
perror("open2");
else
close(fd);
return 0;
}


\
 
 \ /
  Last update: 2010-08-12 23:47    [W:8.114 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site