Skip to contentSkip to conversation

[2.6.3] snd_intel8x0: playing to fast

DISCUSSION Luca 2 participants 4 messages Mar 10, 2004 – Mar 11, 2004

lore
Share & tools
lore

Luca

author
#0 lore raw

Hi,
I'm using linux 2.6.3 with alsalib 1.0.2c. When using alsa output plugin of XMMS or mplayer the song is played too fast. Using OSS emulation works fine.

This is from bootlog:

intel8x0_measure_ac97_clock: measured 49482 usecs
intel8x0: clocking to 48000

And this is the sound card (chiset is SiS740):

00:02.7 Multimedia audio controller: Silicon Integrated Systems [SiS] Sound Controller (rev a0)
Subsystem: Asustek Computer, Inc.: Unknown device 1653
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (13000ns min, 2750ns max)
Interrupt: pin C routed to IRQ 9
Region 0: I/O ports at a800 [size=256]
Region 1: I/O ports at a400 [size=128]
Capabilities: [48] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

I RTFM and tried passing ac97_clock, but:

a) I don't know what value to pass. Tried some random numbers between 40000 and 49000
b) It doens't make any difference

I also tried without powernow-k7 (the machine is a laptop) but without success.

Any idea?

Luca

Signature · 9 lines
Home: http://kronoz.cjb.net
Do, or do not. There is no try.


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
#1 lore raw
Quoted 9 lines · Luca

Hi,
I'm using linux 2.6.3 with alsalib 1.0.2c. When using alsa output plugin of XMMS or mplayer the song is played too fast. Using OSS emulation works fine.

This is from bootlog:

intel8x0_measure_ac97_clock: measured 49482 usecs
intel8x0: clocking to 48000

Make sure the programs are using device "default" or "plughw:0,0" (or whatever device numbers you like). If the programs can't be persuaded to do that they are buggy. Well, those two are buggy anyway.

Signature · 10 lines
Måns Rullgård
[email protected]



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
author
#2 lore raw

Il Wed, Mar 10, 2004 at 11:08:22PM +0100, M?ns Rullg?rd ha scritto:

Quoted 8 lines

*This message was transferred with a trial version of CommuniGate(tm) Pro*

Quoted 5 lines · Luca

Hi,
I'm using linux 2.6.3 with alsalib 1.0.2c. When using alsa output plugin of XMMS or mplayer the song is played too fast. Using OSS emulation works fine.

Quoted 8 lines
Quoted 4 lines

This is from bootlog:

intel8x0_measure_ac97_clock: measured 49482 usecs
intel8x0: clocking to 48000

Make sure the programs are using device "default" or "plughw:0,0" (or whatever device numbers you like). If the programs can't be persuaded to do that they are buggy.

mplayer is using hw:0,0.

alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian)
alsa-init: compiled for ALSA-1.0.3
alsa-init: soundcard set to hw:0
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: current val=16, fragcount=16
alsa-init: got buffersize=65536
alsa9: 44100 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian

It doens't like plugwh:0,0:

alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian)
alsa-init: compiled for ALSA-1.0.3
alsa-init: soundcard set to plughw
alsa-init: pcm opend in block-mode
alsa-init: unable to set periodsize: Invalid argument

Also my .asoundrc was very minimal:

pcm.!default {
type hw
card 0
}

ctl.!default {
type hw
card 0
}

Now I added:

pcm_slave.sl2 {
        pcm "hw:0,0"
        rate 48000
}

pcm.foobar {
type rate
slave sl2
}

But, again, MPlayer refuse to work:

alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian)
alsa-init: compiled for ALSA-1.0.3
alsa-init: soundcard set to foobar
alsa-init: pcm opend in block-mode
alsa-init: unable to set periodsize: Invalid argument

aplay does recognise -Dfoobar (and work even without it).

Quoted 1 line

Well, those two are buggy anyway.

Yep, it seems so :)
Btw, mplayer from CVS (checked out today) works nicely with -ao alsa1x:

alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian)
alsa-init: compiled for ALSA-1.0.3
alsa-init: got device=0, subdevice=0
alsa-init: 1 soundcard found, using: hw:0,0
alsa-init: pcm opened in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa1x: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
...
[resample] Changing sample rate to 48000Hz
[resample] Changing sample rate to 48000Hz
[resample] Using linear interpolation.

So my sound card accept sound only at 48000Hz but old mplayer didn't notice that alsa-lib doesn't accept its request for 44100Hz. Correct?

thanks,
Luca

Signature · 10 lines
Home: http://kronoz.cjb.net
La differenza fra l'intelligenza e la stupidita`?
All'intelligenza c'e` un limite.


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
#3 lore raw
Quoted 11 lines · Luca

Il Wed, Mar 10, 2004 at 11:08:22PM +0100, M?ns Rullg?rd ha scritto:

Quoted 10 lines

*This message was transferred with a trial version of CommuniGate(tm) Pro*

Quoted 7 lines · Luca

Hi,
I'm using linux 2.6.3 with alsalib 1.0.2c. When using alsa output plugin of XMMS or mplayer the song is played too fast. Using OSS emulation works fine.

This is from bootlog:

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

intel8x0_measure_ac97_clock: measured 49482 usecs
intel8x0: clocking to 48000

Make sure the programs are using device "default" or "plughw:0,0" (or whatever device numbers you like). If the programs can't be persuaded to do that they are buggy.

mplayer is using hw:0,0.

Bug.

Quoted 9 lines

alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian)
alsa-init: compiled for ALSA-1.0.3
alsa-init: soundcard set to hw:0
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: current val=16, fragcount=16
alsa-init: got buffersize=65536
alsa9: 44100 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian

Quoted 7 lines

It doens't like plugwh:0,0:

alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian)
alsa-init: compiled for ALSA-1.0.3
alsa-init: soundcard set to plughw
alsa-init: pcm opend in block-mode
alsa-init: unable to set periodsize: Invalid argument

Bug.

Quoted 16 lines

Btw, mplayer from CVS (checked out today) works nicely with -ao alsa1x:

alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian)
alsa-init: compiled for ALSA-1.0.3
alsa-init: got device=0, subdevice=0
alsa-init: 1 soundcard found, using: hw:0,0
alsa-init: pcm opened in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa1x: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
...
[resample] Changing sample rate to 48000Hz
[resample] Changing sample rate to 48000Hz
[resample] Using linear interpolation.

Quoted 2 lines

So my sound card accept sound only at 48000Hz but old mplayer didn't notice that alsa-lib doesn't accept its request for 44100Hz. Correct?

So it seems.

Signature · 10 lines
Måns Rullgård
[email protected]



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click