Hi (again)
Can anybody give me a clue to what is going on with my Audiophile USB
and 48000 Hz sound?
Here is my problem: neither alsaplayer nor mplayer will play 48kHz sound
on my Audiophile but aplay will. Why?
% alsaplayer -F 48000 -d plughw:1 --verbose Stairway_To_Heaven.wav
AlsaPlayer 0.99.75
gives very bad sound
% alsaplayer -F 44100 -d plughw:1 --verbose Stairway_To_Heaven.wav
AlsaPlayer 0.99.75
works fine.
% alsaplayer -F 44100 -d plughw:1 --verbose Stairway_To_Heaven-48000.wav
AlsaPlayer 0.99.75
works fine
% alsaplayer -F 48000 -d plughw:1 --verbose Stairway_To_Heaven-48000.wav
AlsaPlayer 0.99.75
gives very bad sound.
It doesn't appear to be my files that are bad. It is just when I ask alsaplayer to
outout 48kHz that the sound is bad. I see the same problem with mplayer:
it does not like 48kHz WAV files (nor divx's for that matter)
% mplayer -v -ao alsa9:audiophile Stairway_To_Heaven-48000.wav
MPlayer 1.0pre3-3.3.3 (C) 2000-2003 MPlayer Team
Playing Stairway_To_Heaven-48000.wav.
[file] File size is 92454540 bytes
STREAM: [file] Stairway_To_Heaven-48000.wav
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
CACHE_PRE_INIT: 0 [0] 0 pre:0 eof:0
Cache fill: 0.00% (0 bytes) DEMUXER: freeing demuxer at 0x870e480
======= WAVE Format =======
Format Tag: 1 (0x1)
Channels: 2
Samplerate: 48000
avg byte/sec: 192000
Block align: 4
bits/sample: 16
cbSize: 0
===========================
demux_audio: audio data 0x8C - 0x0
Audio file detected.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer.
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 192000->192000 (1536.0 kbit)
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
==========================================================================
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
[libaf] Adding filter dummy
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 and bps
= 2
AF_pre: af format: 2 bps, 2 ch, 48000 hz, little endian signed int
AF_pre: 48000Hz 2ch Signed 16-bit (Little-Endian)
alsa-init: requested format: 48000 Hz, 2 channels, Signed 16-bit
(Little-Endian)
alsa-init: compiled for ALSA-0.9.8
alsa-init: soundcard set to audiophile
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: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa9] 48000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
AO: Description: ALSA-0.9.x audio output
AO: Author: Alex Beregszaszi, Joy Winter <[EMAIL PROTECTED]>
AO: Comment: under developement
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 and bps
= 2
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 and bps
= 2
Video: no video
Freeing 0 unused video chunks
Starting playback...
alsa-space: free space = 65536, status=141723968, prepared --
alsa-space: xrun of at least 2.305 msecs. resetting stream
alsa-space: free space = 0, status=141723968, xrun --
alsa-space: free space = 65536, status=141723968, prepared --
alsa-space: xrun of at least 4.387 msecs. resetting stream
alsa-space: free space = 0, status=141723968, xrun --
gives lots of xrun's and the sound is bad (audiophile is just plughw:1
as mplayer has a silly bug that doesn't let it parse plughw:1 correctly).
Mplayer works well with 44.1kHz WAV files
% mplayer -v -ao alsa9:audiophile Stairway_To_Heaven.wav
MPlayer 1.0pre3-3.3.3 (C) 2000-2003 MPlayer Team
[file] File size is 84942524 bytes
STREAM: [file] Stairway_To_Heaven.wav
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
CACHE_PRE_INIT: 0 [0] 0 pre:0 eof:0
Cache fill: 4.69% (49152 bytes) DEMUXER: freeing demuxer at 0x870e5b0
Searching demuxer type for filename Stairway_To_Heaven.wav ext: .wav
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
======= WAVE Format =======
Format Tag: 1 (0x1)
Channels: 2
Samplerate: 44100
avg byte/sec: 176400
Block align: 4
bits/sample: 16
cbSize: 0
===========================
demux_audio: audio data 0x2C - 0x0
Audio file detected.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer.
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 176400->176400 (1411.2 kbit)
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
[libaf] Adding filter dummy
[dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000001 and bps
= 2
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit
(Little-Endian)
alsa-init: compiled for ALSA-0.9.8
alsa-init: soundcard set to audiophile
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
AO: [alsa9] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
AO: Description: ALSA-0.9.x audio output
AO: Author: Alex Beregszaszi, Joy Winter <[EMAIL PROTECTED]>
AO: Comment: under developement
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
[dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000001 and bps
= 2
[dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000001 and bps
= 2
Starting playback...
alsa-space: free space = 65536, status=141723912, prepared --
A: 3.1 0.1% 31%
works fine.
Feeding mplayer a 96kHz file works
% mplayer -v -ao alsa9:audiophile Stairway_To_Heaven-96000.wav
MPlayer 1.0pre3-3.3.3 (C) 2000-2003 MPlayer Team
Playing Stairway_To_Heaven-96000.wav.
[file] File size is 184908928 bytes
STREAM: [file] Stairway_To_Heaven-96000.wav
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
CACHE_PRE_INIT: 0 [0] 0 pre:0 eof:0
Cache fill: 0.00% (0 bytes) DEMUXER: freeing demuxer at 0x870e480
Checking for YUV4MPEG2
DEMUXER: freeing demuxer at 0x870edb8
ASF_check: not ASF guid!
DEMUXER: freeing demuxer at 0x870edb8
Checking for NuppelVideo
DEMUXER: freeing demuxer at 0x870edb8
Checking for REAL
DEMUXER: freeing demuxer at 0x870edb8
Checking for SMJPEG
DEMUXER: freeing demuxer at 0x870edb8
DEMUXER: freeing demuxer at 0x870f758
DEMUXER: freeing demuxer at 0x870f758
Searching demuxer type for filename Stairway_To_Heaven-96000.wav ext: .wav
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
======= WAVE Format =======
Format Tag: 1 (0x1)
Channels: 2
Samplerate: 96000
avg byte/sec: 384000
Block align: 4
bits/sample: 16
cbSize: 0
===========================
demux_audio: audio data 0x80 - 0x0
Audio file detected.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer.
AUDIO: 96000 Hz, 2 ch, 16 bit (0x10), ratio: 384000->384000 (3072.0 kbit)
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
==========================================================================
Checking audio filter chain for 96000Hz/2ch/16bit -> 96000Hz/2ch/16bit...
[libaf] Adding filter dummy
[dummy] Was reinitialized, rate=96000Hz, nch = 2, format = 0x00000001 and bps
= 2
AF_pre: af format: 2 bps, 2 ch, 96000 hz, little endian signed int
AF_pre: 96000Hz 2ch Signed 16-bit (Little-Endian)
alsa-init: requested format: 96000 Hz, 2 channels, Signed 16-bit
(Little-Endian)
alsa-init: compiled for ALSA-0.9.8
alsa-init: soundcard set to audiophile
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: current val=11, fragcount=11
alsa-init: unable to set periods: Invalid argument
alsa-init: got buffersize=43688
alsa9: 96000 Hz/2 channels/4 bpf/43688 bytes buffer/Signed 16 bit Little Endian
AO: [alsa9] 96000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
AO: Description: ALSA-0.9.x audio output
AO: Author: Alex Beregszaszi, Joy Winter <[EMAIL PROTECTED]>
AO: Comment: under developement
Building audio filter chain for 96000Hz/2ch/16bit -> 96000Hz/2ch/16bit...
[dummy] Was reinitialized, rate=96000Hz, nch = 2, format = 0x00000001 and bps
= 2
[dummy] Was reinitialized, rate=96000Hz, nch = 2, format = 0x00000001 and bps
= 2
Video: no video
Freeing 0 unused video chunks
Starting playback...
alsa-space: free space = 43688, status=141723968, prepared --
A: 1.4 0.3% 25%
works as well.
I was going to assume that my Audiophile doesn't like 48kHz sound but aplay works
% aplay -v -B 1000000 -D hw:1 -c 2 -r 48000 -f S16_BE
Stairway_To_Heaven-48000-S16_BE.raw
Playing raw data 'Stairway_To_Heaven-48000-S16_BE.raw' : Signed 16 bit Big
Endian, Rate 48000 Hz, Stereo
Hardware PCM card 1 'Audiophile USB (tm)' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_BE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 8192
period_time : 170666
tick_time : 10000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 8192
xfer_align : 8192
start_threshold : 16384
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 1073741824
works fine.
plughw is not causing the problem
% aplay -v -B 1000000 -D plughw:1 -c 2 -r 48000 -f S16_BE
Stairway_To_Heaven-48000-S16_BE.raw
Playing raw data 'Stairway_To_Heaven-48000-S16_BE.raw' : Signed 16 bit Big
Endian, Rate 48000 Hz, Stereo
Plug PCM: Hardware PCM card 1 'Audiophile USB (tm)' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_BE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 8192
period_time : 170666
tick_time : 10000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 8192
xfer_align : 8192
start_threshold : 16384
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 1073741824
works
nor about the conversion from little to big endian
% aplay -v -B 1000000 -D plughw:1 -c 2 -r 48000 -f S16_LE
Stairway_To_Heaven-48000-S16_LE.raw
Playing raw data 'Stairway_To_Heaven-48000-S16_LE.raw' : Signed 16 bit Little
Endian, Rate 48000 Hz, Stereo
Plug PCM: Linear conversion PCM (S16_BE)
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 8192
period_time : 170666
tick_time : 10000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 8192
xfer_align : 8192
start_threshold : 16384
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 1073741824
Slave: Hardware PCM card 1 'Audiophile USB (tm)' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_BE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 8192
period_time : 170666
tick_time : 10000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 8192
xfer_align : 8192
start_threshold : 16384
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 1073741824
works
Any idea what is causing both alsaplayer and mplayer problems at 48kHz
(and only at 48kHz)?
I do get some underruns with aplay:
underrun!!! (at least 55.044 ms long)
Status:
state : XRUN
trigger_time: 1076355344.26717000
tstamp : 1076355344.81738000
delay : 0
avail : 16416
avail_max : 16416
what options should I give to aplay to make it work as well as alsaplayer
in this respect (alsaplayer never seems to underrun).
thanks
Stuart
PS
% cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.1.
Compiled on Jan 23 2004 for kernel 2.4.24-1-686 with versioned symbols.
PPS by the way
% cat /proc/asound/cards
0 [I82801CAICH3 ]: ICH - Intel 82801CA-ICH3
Intel 82801CA-ICH3 at 0xce00, irq 11
1 [tm ]: USB-Audio - Audiophile USB (tm)
M-Audio Audiophile USB (tm) at usb-00:1d.0-1.1
Why is my M-Audio Audiophile USB called a "tm"?
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user