FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 02-07-2009, 01:54 PM
Johannes Wiedersich
 
Default 24 bit usb sound on lenny

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

kaffeine, amarok, xine etc. all just crash.

Trying to record some anaolg input with 24bit also fails:


$ arecord -f S24_LE -c 2 -r48000 24-48k-testa.wav
Recording WAVE '24-48k-testa.wav' : Signed 24 bit Little Endian, Rate
48000 Hz, Stereo
^CAborted by signal Interrupt...

appears to behave as expected, but the generated file is finishes at 44
bit.

Everything works nice on 16 bit/48 kHz:

14:30:43-johannes@e13-v21:/home/audio/wav$ 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

*Does anyone have 24 bit sound working with debian lenny?*

FWIW, I have a Terratec phase 26 usb sound card. It features a switch to
change it's audio quality settings for 16 bit/48 kHz, 24/48, 24/96.

My modprobe settings to load it as card 0:

$ more /etc/modprobe.d/sound
alias snd-card-0 snd-usb-audio
options snd-usb-audio index=0

Any help and pointers to improve my sound experience are well appreciated!

Thanks,

Johannes
 
Old 02-08-2009, 05:41 AM
Joel Roth
 
Default 24 bit usb sound on lenny

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.

okay, here's a test with a 24-bit mono file outputing to
my 16-bit soundcard.

aplay organ_6.wav -D default (plays normally)

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.

You can also choose to specify in your $HOME/.asoundrc file what the
output format to the soundcard should be for a particular
device.

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

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.

>
> Trying to record some anaolg input with 24bit also fails:
>
>
> $ arecord -f S24_LE -c 2 -r48000 24-48k-testa.wav
> Recording WAVE '24-48k-testa.wav' : Signed 24 bit Little Endian, Rate
> 48000 Hz, Stereo
> ^CAborted by signal Interrupt...
>
> appears to behave as expected, but the generated file is finishes at 44
> bit.
>
> Everything works nice on 16 bit/48 kHz:
>
> 14:30:43-johannes@e13-v21:/home/audio/wav$ 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

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.

HTH

> *Does anyone have 24 bit sound working with debian lenny?*
>
> FWIW, I have a Terratec phase 26 usb sound card. It features a switch to
> change it's audio quality settings for 16 bit/48 kHz, 24/48, 24/96.
>
> My modprobe settings to load it as card 0:
>
> $ more /etc/modprobe.d/sound
> alias snd-card-0 snd-usb-audio
> options snd-usb-audio index=0
>
> Any help and pointers to improve my sound experience are well appreciated!
>
> Thanks,
>
> Johannes
>



--
Joel Roth


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-08-2009, 11:55 AM
Johannes Wiedersich
 
Default 24 bit usb sound on lenny

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.

> 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.

> 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).

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.

Thanks,

Johannes
 
Old 02-08-2009, 12:08 PM
Johannes Wiedersich
 
Default 24 bit usb sound on lenny

Johannes Wiedersich wrote:
> *Does anyone have 24 bit sound working with debian lenny?*
>
> FWIW, I have a Terratec phase 26 usb sound card. It features a switch to
> change it's audio quality settings for 16 bit/48 kHz, 24/48, 24/96.

There seems to be a related bug filed at ubuntu:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/157198

Johannes
 
Old 02-08-2009, 01:10 PM
Joel Roth
 
Default 24 bit usb sound on lenny

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@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 07:17 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org