Can't open audio device /dev/audio after some time of working in 4.5 needs reboot to fix the Issue

2009-06-18 Thread Siju George
Hi,

I am running 4.5/i386 stable. After working on it for some time the
audio does not give out sound.
mplayer shows the following output.

$ mplayer Carrie\ Underwood\ -\ Jesus\ Take\ The\ Wheel.mp3
MPlayer 1.0rc2-3.3.5 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (Family: 15, Model: 4, Stepping: 1)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.

Playing Carrie Underwood - Jesus Take The Wheel.mp3.
Audio file file format detected.
Clip info:
 Title: Jesus Take The Wheel
 Artist: Carrie Underwood
 Album: Debut Album
 Year: 2005
 Comment:
 Track: 1
 Genre: Other
==
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==
ao2: can't open libsndio
ao2: 44100 Hz  2 chans  s16le [0x9]
[AO SUN] Can't open audio device /dev/audio, Device busy  -> nosound.
AO: [null] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:  22.7 (22.6) of 227.0 (03:47.0)  0.7%

MPlayer interrupted by signal 2 in module: play_audio
$

the song keeps playing but no sound comes out.
If i reboot I can hear the audio for some time and then it dies of
when I start the song again.

Is there any way to fix sound without rebooting?

Thanks

--Siju

$ mixerctl -a
outputs.master=255,255
outputs.master.mute=off
outputs.mono=255
outputs.mono.mute=off
outputs.mono.source=mixerout
outputs.surround=255,255
outputs.surround.mute=off
outputs.surround.lineinjack=off
outputs.center=255
outputs.center.mute=off
outputs.center.micjack=off
outputs.lfe=255
outputs.lfe.mute=off
outputs.lfe.micjack=off
inputs.spkr=255
inputs.spkr.mute=off
inputs.phone=191
inputs.phone.mute=on
inputs.mic=191
inputs.mic.mute=on
inputs.mic.preamp=off
inputs.mic.source=mic0
inputs.line=191,191
inputs.line.mute=on
inputs.cd=191,191
inputs.cd.mute=off
inputs.video=255,255
inputs.video.mute=off
inputs.aux=191,191
inputs.aux.mute=on
inputs.dac=191,191
inputs.dac.mute=off
record.source=mic
record.volume=255,255
record.volume.mute=off
outputs.extamp=on
outputs.spdif=off
$ OpenBSD 4.5-stable (GENERIC) #0: Tue Jun  2 10:15:05 IST 2009
r...@risen.hifxchn2.local:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) 4 CPU 2.80GHz ("GenuineIntel" 686-class) 2.81 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HT
T,TM,SBF,SSE3,MWAIT,DS-CPL,CNXT-ID,xTPR
real mem  = 2113433600 (2015MB)
avail mem = 2035261440 (1940MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 06/02/05, BIOS32 rev. 0 @
0xfa830, SMBIOS rev. 2.3 @ 0xf0800 (40 entries)
bios0: vendor Phoenix Technologies, LTD version "6.00 PG" date 06/02/2005
bios0: Acer Aspire SA60
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices USB0(S5) USB1(S5) USB2(S5) USB3(S5) MAC0(S5)
AMR0(S4) UAR1(S5) PS2M(S5) PS2K(S4) PCI0(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 133MHz
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 14, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
acpitz0 at acpi0: critical temperature 90 degC
acpibtn0 at acpi0: PWRB
bios0: ROM list: 0xc/0x8000 0xc8000/0x4000!
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "SiS 661 PCI" rev 0x11
sisagp0 at pchb0
agp0 at sisagp0: aperture at 0xe800, size 0x400
ppb0 at pci0 dev 1 function 0 "SiS 648FX AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "SiS 6330 VGA" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 2 function 0 "SiS 964 ISA" rev 0x36
pciide0 at pci0 dev 2 function 5 "SiS 5513 EIDE" rev 0x01: 661: DMA,
channel 0 configured to compatibility, channel
1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: 
wd0: 16-sector PIO, LBA, 38166MB, 78165360 sectors
wd1 at pciide0 channel 0 drive 1: 
wd1: 16-sector PIO, LBA, 76319MB, 156301488 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
wd1(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0:  ATAPI
5/cdrom removable
wd2 at pciide0 channel 1 drive 1: 
wd2: 16-sector PIO, LBA48, 38204MB, 78242976 sectors
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 4
wd2(pciide0:1:1): using PIO mode 4, Ultra-DMA mode 5
auich0 at pci0 dev 2 function 7 "SiS 7012 AC97" rev 0xa0: apic 2 int
18 (irq 5), SiS7012 AC97
ac97: codec id 0x414c4760 (Avance Logic ALC655 rev 0)
audio0 at auich0
ohci0 at pci0 dev 3 function 0 "SiS 5597/5598 USB" rev 0x0f: apic 2
int 20 (irq 10), ve

Re: Can't open audio device /dev/audio after some time of working in 4.5 needs reboot to fix the Issue

2009-06-18 Thread Siju George
On Thu, Jun 18, 2009 at 7:04 PM, Alexandre Ratchov wrote:
> On Thu, Jun 18, 2009 at 05:56:55PM +0530, Siju George wrote:
>> Hi,
>>
>> I am running 4.5/i386 stable. After working on it for some time the
>> audio does not give out sound.
>> mplayer shows the following output.
>>
>
> hi,
>
> once it stops working, what shows ``fstat /dev/audio'' ?
> if it shows a process using /dev/audio, what's the
> result of ``ps -l -p PID'', where PID is the PID displayed
> by fstat?
>

Thanks for the reply Alexandre.

$ fstat /dev/audio
USER CMD  PID   FD MOUNTINUM MODE   R/WSZ|DV NAME
$

it doesnt show a process using /dev/audio

--Siju



Re: Can't open audio device /dev/audio after some time of working in 4.5 needs reboot to fix the Issue

2009-06-18 Thread Siju George
On Thu, Jun 18, 2009 at 7:35 PM, Siju George wrote:
>
> $ fstat /dev/audio
> USER CMD  PID   FD MOUNTINUM MODE   R/WSZ|DV
NAME
> $
>

I was running skype through Linux Emulation.
When I killed all the skype process i started getting audio.

Also I am running fvwm2.
when I move around an xterm window the sound stops.
Is it an acceptable behavior?

Thanks

Siju



Re: Can't open audio device /dev/audio after some time of working in 4.5 needs reboot to fix the Issue

2009-06-18 Thread Bryan
On Thu, Jun 18, 2009 at 07:12, Siju George wrote:
> On Thu, Jun 18, 2009 at 7:35 PM, Siju George wrote:
>>
>> $ fstat /dev/audio
>> USER B  B  CMD B  B  B  B  B PID B  FD MOUNT B  B  B  B INUM MODE B  B  B 
R/W B  B SZ|DV
> NAME
>> $
>>
>
> I was running skype through Linux Emulation.
> When I killed all the skype process i started getting audio.
>
> Also I am running fvwm2.
> when I move around an xterm window the sound stops.
> Is it an acceptable behavior?
>
> Thanks
>
> Siju
>
>
I figured out your problem... Carrie Underwood... really?



Re: Can't open audio device /dev/audio after some time of working in 4.5 needs reboot to fix the Issue

2009-06-18 Thread Siju George
On Thu, Jun 18, 2009 at 9:43 PM, Bryan wrote:
>>
>>
> I figured out your problem... Carrie Underwood... really?
>

Didn't get you. Was it a joke or some thing?

--Siju



Re: Can't open audio device /dev/audio after some time of working in 4.5 needs reboot to fix the Issue

2009-06-18 Thread Jacob Meuser
On Thu, Jun 18, 2009 at 07:42:00PM +0530, Siju George wrote:
> On Thu, Jun 18, 2009 at 7:35 PM, Siju George wrote:
> >
> > $ fstat /dev/audio
> > USER CMD  PID   FD MOUNTINUM MODE   R/WSZ|DV
> NAME
> > $
> >
> 
> I was running skype through Linux Emulation.
> When I killed all the skype process i started getting audio.
> 
> Also I am running fvwm2.
> when I move around an xterm window the sound stops.
> Is it an acceptable behavior?

acceptable?  maybe.  expected?  probably.

the kernel is not hard realtime nor is it preemptable.  it can only
do so much at one time.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Can't open audio device /dev/audio after some time of working in 4.5 needs reboot to fix the Issue

2009-06-18 Thread Alexandre Ratchov
On Thu, Jun 18, 2009 at 07:42:00PM +0530, Siju George wrote:
> On Thu, Jun 18, 2009 at 7:35 PM, Siju George wrote:
> >
> > $ fstat /dev/audio
> > USER CMD  PID   FD MOUNTINUM MODE   R/WSZ|DV 
> > NAME
> > $
> >
> 
> I was running skype through Linux Emulation.
> When I killed all the skype process i started getting audio.
> 
> Also I am running fvwm2.
> when I move around an xterm window the sound stops.
> Is it an acceptable behavior?
> 

I'm not sure to understand correctly. You mean it crackles
(short interruptions), or it pauses completely for a long
period?

Pausing is ``normal'', i mean that's how software was designed.

While you move a the xterm window, xterm refreshing is
blocked, so is any program trying to write text on the
terminal. It blocks on writing. So, typically a program with
a progress bar, will block while writing on the terminal,
and may stop processing audio until the xterm is unblocked.

So, all depends on the program running in the xterm. If it
supports non-blocking i/o on the terminal it wont pause,
else it will pause. IIRC mplayer, mpg321, ogg123 all block
on the terminal.

If the program can't be fixed, a simple solution is to
remove the progress bar, or whatever is causing terminal
writes.

-- Alexandre



Re: Can't open audio device /dev/audio after some time of working in 4.5 needs reboot to fix the Issue

2009-06-19 Thread Siju George
On Fri, Jun 19, 2009 at 2:13 AM, Alexandre Ratchov wrote:
> While you move a the xterm window, xterm refreshing is
> blocked, so is any program trying to write text on the
> terminal. It blocks on writing. So, typically a program with
> a progress bar, will block while writing on the terminal,
> and may stop processing audio until the xterm is unblocked.
>

Thanks for your explanation Alexandre.
Actually the sound stops even if i move other xterms which are not
running mplayer.

--Siju



Re: Can't open audio device /dev/audio after some time of working in 4.5 needs reboot to fix the Issue

2009-06-19 Thread Jacob Meuser
On Fri, Jun 19, 2009 at 01:17:43PM +0530, Siju George wrote:
> On Fri, Jun 19, 2009 at 2:13 AM, Alexandre Ratchov wrote:
> > While you move a the xterm window, xterm refreshing is
> > blocked, so is any program trying to write text on the
> > terminal. It blocks on writing. So, typically a program with
> > a progress bar, will block while writing on the terminal,
> > and may stop processing audio until the xterm is unblocked.
> >
> 
> Thanks for your explanation Alexandre.
> Actually the sound stops even if i move other xterms which are not
> running mplayer.

try a different window manager.  I don't see such behaviour with
blackbox.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Can't open audio device /dev/audio after some time of working in 4.5 needs reboot to fix the Issue

2009-06-19 Thread Siju George
On Fri, Jun 19, 2009 at 2:41 PM, Jacob Meuser
wrote:
> On Fri, Jun 19, 2009 at 01:17:43PM +0530, Siju George wrote:
>> On Fri, Jun 19, 2009 at 2:13 AM, Alexandre Ratchov wrote:
>> > While you move a the xterm window, xterm refreshing is
>> > blocked, so is any program trying to write text on the
>> > terminal. It blocks on writing. So, typically a program with
>> > a progress bar, will block while writing on the terminal,
>> > and may stop processing audio until the xterm is unblocked.
>> >
>>
>> Thanks for your explanation Alexandre.
>> Actually the sound stops even if i move other xterms which are not
>> running mplayer.
>
> try a different window manager.  I don't see such behaviour with
> blackbox.
>

blackbox, windowmaker and afterstep does not show suchbehavior.
But fvwm ( default ), fvwm2 (ports ), and fluxbox shows the behavior.

--Siju



Re: Can't open audio device /dev/audio after some time of working in 4.5 needs reboot to fix the Issue

2009-06-19 Thread Thomas Pfaff
On Fri, 19 Jun 2009 09:11:16 +
Jacob Meuser  wrote:
> On Fri, Jun 19, 2009 at 01:17:43PM +0530, Siju George wrote:
> > Actually the sound stops even if i move other xterms which are not
> > running mplayer.
> 
> try a different window manager.  I don't see such behaviour with
> blackbox.
> 

cwm(1) doesn't have this problem, either.



Re: Can't open audio device /dev/audio after some time of working in 4.5 needs reboot to fix the Issue

2009-06-19 Thread Siju George
On Fri, Jun 19, 2009 at 6:38 PM, laurent FANIS wrote:
>
> So it starts normally? i was never able to get past the login process.
>

The way I did it is documented here

http://openbsd-osnew.blogspot.com/2007/11/running-linux-binaries-on-openbsd-howto.html

you need to do

$rm -rf ~/.Skype

every time before you start skype.

--Siju