LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 07-20-2006, 02:34 AM   #1
penguintutor
Member
 
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118

Rep: Reputation: 15
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
 
Old 07-20-2006, 09:03 AM   #2
johnson_steve
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: Reputation: 46
IIRC in Audacity there was an input select that I had to set to line in. otherwise you could use ecasound.
 
Old 07-20-2006, 09:40 AM   #3
penguintutor
Member
 
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118

Original Poster
Rep: Reputation: 15
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.
 
Old 07-21-2006, 02:11 AM   #4
penguintutor
Member
 
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118

Original Poster
Rep: Reputation: 15
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
 
Old 07-22-2006, 09:46 PM   #5
johnson_steve
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: Reputation: 46
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.
 
Old 07-24-2006, 12:05 PM   #6
penguintutor
Member
 
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118

Original Poster
Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to record or play a wav file using ALSA stephenwalter Programming 1 08-18-2005 02:08 PM
Unable to record mic-in with SoundBlaster Live! while able to record other sources max76230 Linux - Newbie 2 03-14-2005 04:31 AM
Problem upgrading Alsa with Ubuntu sebb Linux - Software 1 11-25-2004 06:24 AM
Cannot record audio using ALSA with OSS emulation mhearn Linux - General 0 10-01-2003 08:14 AM
problem with alsa drivers, unable to run ./configure mankeponken Linux - Newbie 15 07-28-2003 03:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration