public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] mplayer sound issues
@ 2006-02-28 21:29 Mike Myers
  2006-02-28 22:11 ` Richard Fish
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Myers @ 2006-02-28 21:29 UTC (permalink / raw
  To: gentoo-user

Hey folks!

I'm having kind of a weird problem with mplayer.  I can play some 
things, but not others but only under certain circumstances.  I can play 
.mp3 files and movies.  I can play anything if I'm using the arts driver 
as the audio output, except when I play DVDs, I get no sound.  I can get 
sound with dvds in xine, but i can't get a decent video driver to 
display the video without choppiness with xine.  If I use the alsa 
driver with mplayer, I can't seem to play .wav files.  I can play them 
with arts however.  I'd really prefer to use alsa though, because 
there's lag whenever I skip forwards or backwards.  I use it to 
transcribe phone messages, so that lag is extremely irritating.

Except for dvds, mplayer was working great with .wav files.  I'm not 
sure what the difference is at all, but I'm just guessing something 
needs recompiled or something like that.  I tried recompiling mplayer 
with different use flags several times, recompiling the libraries for 
mplayer, but no matter what I do I get the same issue.  What happens 
exactly, with alsa in mplayer, is it'll start to play for a split second 
and then just freeze.  The output looks like this from a console:

laptop$ mplayer file.wav
MPlayer dev-CVS-060217-04:46-3.4.4 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium M Dothan (Family: 6, Stepping: 8)
MMX supported but disabled
MMX2 supported but disabled
CPUflags:  MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: SSE SSE2



91 audio & 206 video codecs
Playing 2006-02-27 13-42-42.wav.
Audio file file format detected.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit/100.00% (ratio: 16000->16000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or 
resource busy
alsa-init: 1 soundcard found, using: default
alsa: 8000 Hz/1 channels/2 bpf/5460 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 8000Hz 1ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   0.0 (00.0) of 2991.0 (49:51.0) ??,?%

I have to press ctrl+c to stop it.  I've tried various wave files, 
including ones I've used before that worked before.  These same files 
work with arts, except for the lag.  Can anybody help me with this?

Thanks in advance,
Mike
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] mplayer sound issues
  2006-02-28 21:29 [gentoo-user] mplayer sound issues Mike Myers
@ 2006-02-28 22:11 ` Richard Fish
  2006-02-28 22:49   ` Mike Myers
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Fish @ 2006-02-28 22:11 UTC (permalink / raw
  To: gentoo-user

On 2/28/06, Mike Myers <fluffymikey@gmail.com> wrote:
> Opening audio decoder: [pcm] Uncompressed PCM audio decoder
> AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit/100.00% (ratio: 16000->16000)
> Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
> ==========================================================================
> [AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or
> resource busy
> alsa-init: 1 soundcard found, using: default
> alsa: 8000 Hz/1 channels/2 bpf/5460 bytes buffer/Signed 16 bit Little Endian
> AO: [alsa] 8000Hz 1ch s16le (2 bytes per sample)

What version of alsa-lib do you have, and do you use the in-kernel
alsa drivers or the alsa-driver package?  Which version?

Does anything change if you do "mplayer -ao alsa file.wav"?

The above "resource busy" error indicates that something is using the
legacy OSS interface.  IIRC, older versions of alsa could not share
this interface, and in fact would prevent other applications from
using the sound card at all if something was using this interface.

Maybe try an "lsof /dev/dsp" to see what is using the old OSS interface...

-Richard

-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] mplayer sound issues
  2006-02-28 22:11 ` Richard Fish
@ 2006-02-28 22:49   ` Mike Myers
  2006-02-28 23:03     ` Richard Fish
  2006-02-28 23:12     ` Richard Fish
  0 siblings, 2 replies; 8+ messages in thread
From: Mike Myers @ 2006-02-28 22:49 UTC (permalink / raw
  To: gentoo-user

Richard Fish wrote:

>On 2/28/06, Mike Myers <fluffymikey@gmail.com> wrote:
>  
>
>>Opening audio decoder: [pcm] Uncompressed PCM audio decoder
>>AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit/100.00% (ratio: 16000->16000)
>>Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
>>==========================================================================
>>[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or
>>resource busy
>>alsa-init: 1 soundcard found, using: default
>>alsa: 8000 Hz/1 channels/2 bpf/5460 bytes buffer/Signed 16 bit Little Endian
>>AO: [alsa] 8000Hz 1ch s16le (2 bytes per sample)
>>    
>>
>
>What version of alsa-lib do you have, and do you use the in-kernel
>alsa drivers or the alsa-driver package?  Which version?
>  
>
I'm using the kernel alsa drivers with the 2.6.15-suspend2-r6 kernel 
with alsa-lib 1.0.11_rc3 and alsa-headers 1.0.11_rc3.

>Does anything change if you do "mplayer -ao alsa file.wav"?
>  
>
This is where it's kinda weird.  If I use vo=alsa then the .wav files 
won't play at all.  If I use ao=arts, then they work, but skipping 
around, like fast forwarding or rewinding lags.  Like, I'll press the 
left or right button and then about a second later it will actually 
rewind or forward.  Before I migrated to the modular xorg, when I used 
the alsa driver it worked fine and it responded immediately when I 
skipped around.

>The above "resource busy" error indicates that something is using the
>legacy OSS interface.  IIRC, older versions of alsa could not share
>this interface, and in fact would prevent other applications from
>using the sound card at all if something was using this interface.
>
>Maybe try an "lsof /dev/dsp" to see what is using the old OSS interface...
>
>-Richard
>
>  
>
I seem to get that error regardless of what I'm playing.  I can play 
some files, like mp3s with the ao=alsa and that message will still 
appear, but it plays anyway.

Also, if I do the 'lsof /dev/dsp' command as you suggested, it only goes 
to a newline and then just sits there.  It seems to do that for any file 
i use it on.  The man page for that program is like a mile long and I 
don't have time to read through it right now.  I'll read it later though.

Also, I don't know if it's worth mentioning or not, but the whole reason 
I upgraded to the modular xorg is because it was the only way I could 
get my mobile intel video card to work with the i810 driver and dri 
rendering.
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] mplayer sound issues
  2006-02-28 22:49   ` Mike Myers
@ 2006-02-28 23:03     ` Richard Fish
  2006-02-28 23:22       ` Mike Myers
  2006-02-28 23:12     ` Richard Fish
  1 sibling, 1 reply; 8+ messages in thread
From: Richard Fish @ 2006-02-28 23:03 UTC (permalink / raw
  To: gentoo-user

On 2/28/06, Mike Myers <fluffymikey@gmail.com> wrote:
> This is where it's kinda weird.  If I use vo=alsa then the .wav files
> won't play at all.  If I use ao=arts, then they work, but skipping
> around, like fast forwarding or rewinding lags.  Like, I'll press the
> left or right button and then about a second later it will actually
> rewind or forward.

In the KDE Control Center, under Sounds & Multimedia->Sound System,
there is a control for the Sound buffer.  Reducing that to the minimum
should eliminate the lagging with arts.

Also, on the "Hardware" tab of the Sound System configuration, is the
audio device set to ALSA?

-Richard

-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] mplayer sound issues
  2006-02-28 22:49   ` Mike Myers
  2006-02-28 23:03     ` Richard Fish
@ 2006-02-28 23:12     ` Richard Fish
  2006-02-28 23:33       ` Mike Myers
  1 sibling, 1 reply; 8+ messages in thread
From: Richard Fish @ 2006-02-28 23:12 UTC (permalink / raw
  To: gentoo-user

On 2/28/06, Mike Myers <fluffymikey@gmail.com> wrote:
> I seem to get that error regardless of what I'm playing.  I can play
> some files, like mp3s with the ao=alsa and that message will still
> appear, but it plays anyway.

Ok, theorizing time.  (ie., I have absolute no idea whether this is
right or not)

It sounds like this may be related to the sampling frequency of the
generated PCM.  If some application (like arts) is using /dev/dsp and
programming a specific rate (like 44100Hz), then when another
application (like mplayer) wants to generate PCM, it must program a
different rate (the wav file in your original message uses a 8000Hz
rate).  But the card cannot be changed to the 8kHz rate because the
original application is still "using" the OSS device.

If you play through arts, it handles the rate conversions for you, so
everything works.

You can test this by trying "mplayer -srate 44100 -ao arts file.wav". 
You can try different rates, or carefully examine the output of
mplayer with an mp3 to see what rate it is using there.

One last question: do you have a ~/.asoundrc file, and if so, what is in it?

-Richard

-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] mplayer sound issues
  2006-02-28 23:03     ` Richard Fish
@ 2006-02-28 23:22       ` Mike Myers
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Myers @ 2006-02-28 23:22 UTC (permalink / raw
  To: gentoo-user

Richard Fish wrote:

>On 2/28/06, Mike Myers <fluffymikey@gmail.com> wrote:
>  
>
>>This is where it's kinda weird.  If I use vo=alsa then the .wav files
>>won't play at all.  If I use ao=arts, then they work, but skipping
>>around, like fast forwarding or rewinding lags.  Like, I'll press the
>>left or right button and then about a second later it will actually
>>rewind or forward.
>>    
>>
>
>In the KDE Control Center, under Sounds & Multimedia->Sound System,
>there is a control for the Sound buffer.  Reducing that to the minimum
>should eliminate the lagging with arts.
>  
>
Adjusting that doesn't have any affect.  There's still a significant lag 
regardless of how I adjust that buffer.  That lag was there with arts 
before I started having problems with alsa.  There was no lag at all if 
I just used ao alsa though.  In fact it would seek so fast that the part 
I skipped to played over the part I was on so I'd hear to parts of the 
same file at the same time for a very very brief time.  It was short 
enough to not disrupt anything though, so in a way it kind of acted like 
some sort of command recognition feedback.  I know that's not how it's 
meant to work, but it was nice when transcribing, heh.

>Also, on the "Hardware" tab of the Sound System configuration, is the
>audio device set to ALSA?
>
>-Richard
>
>  
>
Yes
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] mplayer sound issues
  2006-02-28 23:12     ` Richard Fish
@ 2006-02-28 23:33       ` Mike Myers
  2006-03-01  6:58         ` Mike Myers
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Myers @ 2006-02-28 23:33 UTC (permalink / raw
  To: gentoo-user

Richard Fish wrote:

>On 2/28/06, Mike Myers <fluffymikey@gmail.com> wrote:
>  
>
>>I seem to get that error regardless of what I'm playing.  I can play
>>some files, like mp3s with the ao=alsa and that message will still
>>appear, but it plays anyway.
>>    
>>
>
>Ok, theorizing time.  (ie., I have absolute no idea whether this is
>right or not)
>
>It sounds like this may be related to the sampling frequency of the
>generated PCM.  If some application (like arts) is using /dev/dsp and
>programming a specific rate (like 44100Hz), then when another
>application (like mplayer) wants to generate PCM, it must program a
>different rate (the wav file in your original message uses a 8000Hz
>rate).  But the card cannot be changed to the 8kHz rate because the
>original application is still "using" the OSS device.
>  
>
The weird thing is that this was totally working great before modular 
Xorg.  I'm really thinking it's just a matter of reinstalling 
something.  I just don't know what.  Also, when I play the .wav file, it 
plays for like a split second, and then mplayer just hangs.  But I do 
hear it for that first short second.

>If you play through arts, it handles the rate conversions for you, so
>everything works.
>
>You can test this by trying "mplayer -srate 44100 -ao arts file.wav". 
>You can try different rates, or carefully examine the output of
>mplayer with an mp3 to see what rate it is using there.
>
>One last question: do you have a ~/.asoundrc file, and if so, what is in it?
>
>-Richard
>
>  
>
Here's the output from doing that:

/Desktop $ mplayer -vo alsa -srate 44100 file.wav
MPlayer dev-CVS-060217-04:46-3.4.4 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium M Dothan (Family: 6, Stepping: 8)
MMX supported but disabled
MMX2 supported but disabled
CPUflags:  MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: SSE SSE2



91 audio & 206 video codecs
Playing 2006-02-27 13-42-42.wav.
Audio file file format detected.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit/100.00% (ratio: 16000->16000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or 
resource busy
alsa-init: 1 soundcard found, using: default
alsa: 44100 Hz/1 channels/2 bpf/30104 bytes buffer/Signed 16 bit Little 
Endian
AO: [alsa] 44100Hz 1ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   0.0 (00.0) of 2991.0 (49:51.0) ??,?%

It does the same, plays for a short second and then it still locks up.  
I have an mp3 that runs at that rate and it works fine.

Thanks a lot for your help and patience so far, btw.  I really 
appreciate it.

Mike
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] mplayer sound issues
  2006-02-28 23:33       ` Mike Myers
@ 2006-03-01  6:58         ` Mike Myers
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Myers @ 2006-03-01  6:58 UTC (permalink / raw
  To: gentoo-user

Just to keep you posted, if you're still interested;

I migrated to alsa-drivers from using the kernel drivers.  That alone
didn't seem to fix anything.  So, I updated to the 1.0_pre7-r1 version
of mplayer and that seemed to take care of the alsa issue with the wav
files.

I'm still having trouble playing dvds though.  But that's really a
separate issue.

On 2/28/06, Mike Myers <fluffymikey@gmail.com> wrote:
> Richard Fish wrote:
>
> >On 2/28/06, Mike Myers <fluffymikey@gmail.com> wrote:
> >
> >
> >>I seem to get that error regardless of what I'm playing.  I can play
> >>some files, like mp3s with the ao=alsa and that message will still
> >>appear, but it plays anyway.
> >>
> >>
> >
> >Ok, theorizing time.  (ie., I have absolute no idea whether this is
> >right or not)
> >
> >It sounds like this may be related to the sampling frequency of the
> >generated PCM.  If some application (like arts) is using /dev/dsp and
> >programming a specific rate (like 44100Hz), then when another
> >application (like mplayer) wants to generate PCM, it must program a
> >different rate (the wav file in your original message uses a 8000Hz
> >rate).  But the card cannot be changed to the 8kHz rate because the
> >original application is still "using" the OSS device.
> >
> >
> The weird thing is that this was totally working great before modular
> Xorg.  I'm really thinking it's just a matter of reinstalling
> something.  I just don't know what.  Also, when I play the .wav file, it
> plays for like a split second, and then mplayer just hangs.  But I do
> hear it for that first short second.
>
> >If you play through arts, it handles the rate conversions for you, so
> >everything works.
> >
> >You can test this by trying "mplayer -srate 44100 -ao arts file.wav".
> >You can try different rates, or carefully examine the output of
> >mplayer with an mp3 to see what rate it is using there.
> >
> >One last question: do you have a ~/.asoundrc file, and if so, what is in it?
> >
> >-Richard
> >
> >
> >
> Here's the output from doing that:
>
> /Desktop $ mplayer -vo alsa -srate 44100 file.wav
> MPlayer dev-CVS-060217-04:46-3.4.4 (C) 2000-2006 MPlayer Team
> CPU: Intel Pentium M Dothan (Family: 6, Stepping: 8)
> MMX supported but disabled
> MMX2 supported but disabled
> CPUflags:  MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
> Compiled for x86 CPU with extensions: SSE SSE2
>
>
>
> 91 audio & 206 video codecs
> Playing 2006-02-27 13-42-42.wav.
> Audio file file format detected.
> ==========================================================================
> Opening audio decoder: [pcm] Uncompressed PCM audio decoder
> AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit/100.00% (ratio: 16000->16000)
> Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
> ==========================================================================
> [AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or
> resource busy
> alsa-init: 1 soundcard found, using: default
> alsa: 44100 Hz/1 channels/2 bpf/30104 bytes buffer/Signed 16 bit Little
> Endian
> AO: [alsa] 44100Hz 1ch s16le (2 bytes per sample)
> Video: no video
> Starting playback...
> A:   0.0 (00.0) of 2991.0 (49:51.0) ??,?%
>
> It does the same, plays for a short second and then it still locks up.
> I have an mp3 that runs at that rate and it works fine.
>
> Thanks a lot for your help and patience so far, btw.  I really
> appreciate it.
>
> Mike
>


--
Mike Myers
mike@yaay.us
http://www.yaay.us

-- 
gentoo-user@gentoo.org mailing list



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

end of thread, other threads:[~2006-03-01  7:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-28 21:29 [gentoo-user] mplayer sound issues Mike Myers
2006-02-28 22:11 ` Richard Fish
2006-02-28 22:49   ` Mike Myers
2006-02-28 23:03     ` Richard Fish
2006-02-28 23:22       ` Mike Myers
2006-02-28 23:12     ` Richard Fish
2006-02-28 23:33       ` Mike Myers
2006-03-01  6:58         ` Mike Myers

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