Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-20-2006, 02:34 AM
|
#1
|
Member
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118
Rep:
|
Unable to record Audio on Ubuntu - ALSA problem?
I'm normally a server person but I'm now trying to record some audio and I'm a bit stuck on how the Linux sound system works. I've read the Mini How-to, but I still can't figure out what is happening.
I have a Thinkpad T22 and the soundcard is detected as:
Sound Fusion CS46**, Chip Cirrus Logic CS4297A rev 4.
I am running Ubuntu 6 (Dapper Drake)
I am wanting to record some audio from the Line-in port of the laptop. This is taking some piano music from a tape, with the intention of converting it to CD / MP3.
The sound is coming in OK as I can adjust the sound levels so that it can be heard through the speakers, but I am unable to record.
I've tried using the "Sound Recorder", which just hangs whenever I try and use it, and Audacity, which tries to record, but is just empty.
I have adjusted the line volume in ALSA Mixer (which affects the sound coming out of my speakers, but not the recording).
I have the following devices in /dev
Quote:
crw-rw---- 1 root audio 14, 12 2006-07-17 19:55 /dev/adsp
crw-rw---- 1 root audio 14, 4 2006-07-17 19:55 /dev/audio
crw-rw---- 1 root audio 14, 9 2006-07-17 19:55 /dev/dmmidi
crw-rw---- 1 root audio 14, 3 2006-07-17 19:55 /dev/dsp
crw-rw---- 1 root audio 14, 2 2006-07-17 19:55 /dev/midi
crw-rw---- 1 root audio 14, 0 2006-07-17 19:55 /dev/mixer
crw-rw---- 1 root audio 10, 135 2006-07-17 19:55 /dev/rtc
|
and the following in /dev/snd
Quote:
crw-rw---- 1 root audio 116, 0 2006-07-17 19:55 controlC0
crw-rw---- 1 root audio 116, 8 2006-07-17 19:55 midiC0D0
crw-rw---- 1 root audio 116, 24 2006-07-17 19:55 pcmC0D0c
crw-rw---- 1 root audio 116, 16 2006-07-17 19:55 pcmC0D0p
crw-rw---- 1 root audio 116, 17 2006-07-17 18:55 pcmC0D1p
crw-rw---- 1 root audio 116, 18 2006-07-17 19:55 pcmC0D2p
crw-rw---- 1 root audio 116, 33 2006-07-17 19:55 timer
|
Audacity lists the device as /dev/dsp, and doesn't allow any other device to be selected.
I can't find any references to ALSA in either the syslog or messages.
Can anyone please give me an idea of where I should start looking.
Thanks
|
|
|
07-20-2006, 09:03 AM
|
#2
|
Senior Member
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152
Rep:
|
IIRC in Audacity there was an input select that I had to set to line in. otherwise you could use ecasound.
|
|
|
07-20-2006, 09:40 AM
|
#3
|
Member
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118
Original Poster
Rep:
|
Thanks for your reply
The input is set to Line on Audacity.
I will try ecasound to see if that is different, but I suspect that this is something more fundamental as Sound Recorder doesn't work either.
|
|
|
07-21-2006, 02:11 AM
|
#4
|
Member
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118
Original Poster
Rep:
|
I have tried using ecsound, but still no joy.
I used the command:
Code:
ecasound -f:16,2,44100 -i /dev/dsp -o filename.wav
I also tried it on the /dev/mixer, but that was refused, so looks like it does have to be /dev/dsp.
Here is a bit more information about my system, don't know if it will help at all:
Code:
$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.10rc3 (Mon Nov 07 13:30:21 2005 UTC).
Code:
$ cat /proc/asound/cards
0 [CS46xx ]: CS46xx - Sound Fusion CS46xx
Sound Fusion CS46xx at 0xe8122000/0xe8000000, irq 11
Code:
$ cat /proc/asound/devices
8: [0- 0]: raw midi
18: [0- 2]: digital audio playback
17: [0- 1]: digital audio playback
16: [0- 0]: digital audio playback
24: [0- 0]: digital audio capture
0: [0- 0]: ctl
33: : timer
Code:
$ cat /proc/asound/oss-devices
cat: /proc/asound/oss-devices: No such file or directory
Code:
$ cat /proc/asound/pcm
00-00: CS46xx : CS46xx : playback 31 : capture 1
00-01: CS46xx - Rear : CS46xx - Rear : playback 31
00-02: CS46xx - IEC958 : CS46xx - IEC958 : playback 1
|
|
|
07-22-2006, 09:46 PM
|
#5
|
Senior Member
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152
Rep:
|
I'm thinking you don't have oss emulation working. oss is the old system. /dev/dsp & /dev/mixer are oss and this is depreciated in the 2.6 kernel. /dev/mixer isn't an audio io it just controls the mixer. alsa is the new sound system, but since some programs (like audacity) only support oss alsa has an oss compatibility layer (but yours may not be enabled) when I sugested ecasound it was because it is a very versatile program that supports many io options including alsa try:
Code:
ecasound -f:16,2,44100 -i:alsa -o filename.wav
or
ecasound -f:16,2,44100 -i:alsa,io1 -o filename.wav
depending on your system. (btw -f:16,2,44100 is not needed as this is the default setting.)
use alsamixer to set you levels and select line for capture.
Last edited by johnson_steve; 07-22-2006 at 10:04 PM.
|
|
|
07-24-2006, 12:05 PM
|
#6
|
Member
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118
Original Poster
Rep:
|
Thanks for your suggestions, unfortunately it's still not working.
Code:
$ ecasound -i:alsa -o alsatest.wav
*********************************************************************************
ecasound v2.4.3 (C) 1997-2005 Kai Vehmanen and others
********************************************************************************-
[ Session created ] -----------------------------------------------------------
[ Chainsetup created (cmdline) ] ----------------------------------------------
[ Connecting chainsetup ] ----------------------------------------------------
(eca-chainsetup) 'rt' buffering mode selected.
(audioio_alsa) Warning! Period-size differs from current client buffersize.
(eca-chainsetup) Audio object "alsa", mode "read".
(audio-io) Format: s16_le, channels 2, srate 44100, interleaved.
(eca-chainsetup) Audio object "alsatest.wav", mode "read/write".
(audio-io) Format: s16_le, channels 2, srate 44100, interleaved.
- [ Chainsetup connected ] -----------------------------------------------------
(eca-control-objects) Connected chainsetup: "command-line-setup".
- [ Controller/Starting batch processing ] --------------------------------------
[ Engine init - Driver start ] -----------------------------------------------
(eca-engine) Using realtime-scheduling (SCHED_FIFO:50).
- [ Controller/Processing stopped (cond) ] -------------------------------------
Warning: DBC_ENSURE failed - "is_running() == false", eca-control-base.cpp, 276.-
[ Controller/Processing stopped (cond) ] -------------------------------------
^X
Warning: DBC_ENSURE failed - "is_running() == false", eca-control-base.cpp, 276.
Killed
It took a kill -9 to stop it, and creates an empty file.
I've been able to overcome my immediate problem using my desktop PC which runs Fedora. It would be nice to know what the problem was though.
|
|
|
All times are GMT -5. The time now is 10:14 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|