Re: 24 bit usb sound on lenny
- From: Joel Roth <joelz@xxxxxxxxx>
- Date: Sun, 8 Feb 2009 04:10:46 -1000
On Sun, Feb 08, 2009 at 01:55:36PM +0100, Johannes Wiedersich wrote:
Thanks for your reply, Joel!
Joel Roth wrote:
On Sat, Feb 07, 2009 at 03:54:41PM +0100, Johannes Wiedersich wrote:
Hallo all!
On switching my usb sound card to 24bit audio, all applications using
the card will crash/segfault:
$ aplay led_zeppelin-houses_of_the_holy-a.wav
Playing WAVE 'led_zeppelin-houses_of_the_holy-a.wav' : Signed 16 bit
Little Endian, Rate 44100 Hz, Stereo
Segmentation fault
There are many wrinkles and ways of solving problems
with Linux audio.
At the ALSA level, the 'default' pcm device as provided by modern
kernels automatically performs format conversion. Maybe some
of the others, too.
$ aplay -L
provides a list of your system's ALSA pcm sound devices.
$ aplay -L
surround40:CARD=USB2448,DEV=0
PHASE 26 USB(24/48), USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=USB2448,DEV=0
PHASE 26 USB(24/48), USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=USB2448,DEV=0
PHASE 26 USB(24/48), USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=USB2448,DEV=0
PHASE 26 USB(24/48), USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=USB2448,DEV=0
PHASE 26 USB(24/48), USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
looks fine to me, but there is no line that looks like plain 'stereo'.
If I switch to 16 bit on the sound card, sound works and shows this:
$ aplay -L
default:CARD=USB1648
PHASE 26 USB(16/48), USB Audio
Default Audio Device
front:CARD=USB1648,DEV=0
PHASE 26 USB(16/48), USB Audio
Front speakers
surround40:CARD=USB1648,DEV=0
PHASE 26 USB(16/48), USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=USB1648,DEV=0
PHASE 26 USB(16/48), USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=USB1648,DEV=0
PHASE 26 USB(16/48), USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=USB1648,DEV=0
PHASE 26 USB(16/48), USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=USB1648,DEV=0
PHASE 26 USB(16/48), USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=USB1648,DEV=0
PHASE 26 USB(16/48), USB Audio
IEC958 (S/PDIF) Digital Audio Output
null
Discard all samples (playback) or generate zero samples (capture)
Now for your system, you should reboot or unplug and replug
your USB sound device after changing to 24-bit to ensure the
ALSA driver reads the 24-bit configuration.
Done, redone and repeated again ;-)
So far without success. It seems to be either a config problem or a bug
(alsa or kernel?).
You can also choose to specify in your $HOME/.asoundrc file what the
output format to the soundcard should be for a particular
device.
How to do that?
http://alsa.opensrc.org/index.php/.asoundrc
shows how to set the sample rate, but that seems to fine, here.
According to:
http://alsa.opensrc.org/.asoundrc#Default_PCM_device
ALSA usually maps 'default' (missing in your listing with
card set to 24-bit) to plughw:0,0
plughw:0,0 gets the sample-rate conversion, in comparison to
hw:0,0 which is the naked hardware device.
(hw:0 is usually shorthand for hw:0,0.)
So try this, too:
aplay -D plughw:0,0 somestereo.wav
If it works, you might try creating a file .asoundrc in
your home directory with the line:
pcm.default! plughw:0,0
or from the .asoundrc pages:
pcm.default! surround40:USB2448
These have a chance, since the OSS emulation is usually
directed to the 'default' device which you say is
missing in the aplay -L listing when the card is in 24-bit
mode.
I find the Ecasound provides an easy way to handle
format conversions.
$ ecasound -i cd-stereo.wav -f:s24_le,2,44100 -o alsa,hw:0
Playing a wav with this command line works.
Is the playback speed the same when you use -f:s24_le,2,48000 ?
How about the other way, recording something.
ecasound -i alsa,hw:0 -f:s24_le,2,48000 -o test.wav
Maybe your microphone is mono so you'll use
-f:24_le,1,44100 to save recording a blank channel.
Ecasound is a swiss-army knife of audio processing,
can do many common audio processing tasks.
kaffeine, amarok, xine etc. all just crash.
It sounds like a configuration problem, maybe ALSA
needs to be told that your USB soundcard is set to 24 bits.
How to do that?
This suggests that you are 99% there, since your ALSA driver is
already taking care of converting the signal from 44100 to
48000 Hz.
Good luck with that last 1%. 24 bits will help if you
are doing multitrack stuff. In which case you might
consider Audacity (friendly GUI), Ardour (total pro)
or even Nama (http://ecmd.infogami.com) which I have
developed using Ecasound for audio processing.
Audacity doesn't crash :-) , however, my speakers start to beep and
crack in all unpleasant sounds imaginable, as soon as I start it
(without trying to play or record anything).
if you type
lsmod | grep snd
you'll get a list of all the sound modules that are loaded.
I think Audacity plays through OSS emulation (via a sound
device called /dev/dsp).
I should have told before, that the sound card works fine on 24 bit on
etch, but NOT on lenny. I just checked with the etch system of my girl
friend. There it works 'plug and play' without a glitch and without
having to configure anything.
That is part of the joy of it, and a reason why if someone has a
production system that they use for real work, they don't
casually upgrade.
hope this helps,
Joel
Thanks,
Johannes
--
Joel Roth
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- References:
- 24 bit usb sound on lenny
- From: Johannes Wiedersich
- Re: 24 bit usb sound on lenny
- From: Joel Roth
- Re: 24 bit usb sound on lenny
- From: Johannes Wiedersich
- 24 bit usb sound on lenny
- Prev by Date: Re: Which programming Language
- Next by Date: Re: Which programming Language
- Previous by thread: Re: 24 bit usb sound on lenny
- Next by thread: Re: 24 bit usb sound on lenny
- Index(es):
Relevant Pages
|