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.
|
 |
12-28-2019, 09:29 AM
|
#1
|
Member
Registered: Jun 2009
Location: Cleveland, TN
Distribution: Mint 21.3
Posts: 527
Rep:
|
Cannot Record Audio From "line-in" as the Source
I'm going to take a stab that this is really a hardware issue as opposed to a software issue. I am attempting to record audio from a cassette recorder where it is plugged into the "line-in" jack.
I can hear the audio from "line-in" on the speakers, but when I attempt to record with Audacity (version 2.3.3) all I get is a very loud crackling static. I am also using PulseAudio Volume Control and the volume bar, by going up and down, implies that an audio signal is being processed. Additionally, I can hear sound out of the speakers.
The computer is dual boot. I tested imputing audio from "line-in" under Windows10 using Audacity and it successfully recorded the audio from "line-in".
Under Linux, I am using Mint 19.3. The kernel being used is: 4.15.0-72-generic
|
|
|
12-28-2019, 10:47 AM
|
#2
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Hi Steve
In my opinion, this is definitely not a hardware problem, since you were able to get satisfactory results in Windows with Audacity on the same computer.
My home recording studio (sounds more impressive than it is - a hobby of mine) is based on Linux and I regularly use Audacity for analog - digital conversion (what you're trying to do, essentially). For the computer I use in the studio, I tend to avoid PulseAudio like the plague, as I feel it adds an unnecessary layer to the sound path. My setup is built around plain old Alsa and Jack.
Unless this is a once-in-a-blue-moon thing you're doing (i.e. you don't spend a lot of time on sound conversion or recording with this computer), my first attempt at a solution would involve removing PulseAudio from the equation. Also, you need to make sure Audacity is properly set up (source, recording levels ...), but since you managed well with it under Windows, chances are that is not your problem.
Let us know if this helps.
|
|
|
12-28-2019, 11:09 AM
|
#3
|
LQ Guru
Registered: Oct 2004
Distribution: Arch
Posts: 5,372
|
Quote:
I'm going to take a stab that this is really a hardware issue as opposed to a software issue
|
Quote:
I can hear the audio from "line-in" on the speakers.
|
One solution:
You can make a virtual loopback device and record what is coming through the sound device.
There is a kernel module that allows that. snd-aloop
You need a virtual loopback device.
Example loopback config ~/.asoundrc
Code:
pcm.!default {
type asym
playback.pcm "LoopAndReal"
#capture.pcm "looprec"
capture.pcm "hw:0,0"
}
pcm.looprec {
type hw
card "Loopback"
device 1
subdevice 0
}
pcm.LoopAndReal {
type plug
slave.pcm mdev
route_policy "duplicate"
}
pcm.mdev {
type multi
slaves.a.pcm pcm.MixReale
slaves.a.channels 2
slaves.b.pcm pcm.MixLoopback
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}
pcm.MixReale {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
rate 48000
#rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192
}
}
pcm.MixLoopback {
type dmix
ipc_key 1025
slave {
pcm "hw:Loopback,0,0"
rate 48000
#rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192
}
}
Then:
Capture what you want, how you want. Example:
Code:
ffmpeg -f alsa -i hw:1,1 -c:a libmp3lame -b:a 32k -vn capture.mp3
Or dump it raw.
That will allow you to capture anything coming through your sound device.
Then unload the loopback when you are done if you want.
Code:
mv ~/.asoundrc ~/.loop_asoundrc
modprobe -r snd-aloop
You'll need to use your own parameters.
There are example ~/.asoundrc files on the net.
|
|
1 members found this post helpful.
|
12-28-2019, 01:36 PM
|
#4
|
Member
Registered: Jun 2009
Location: Cleveland, TN
Distribution: Mint 21.3
Posts: 527
Original Poster
Rep:
|
Quote:
Originally Posted by Rickkkk
In my opinion, this is definitely not a hardware problem, since you were able to get satisfactory results in Windows with Audacity on the same computer.
|
I pondered that issue, but I opted for considering it to be hardware related since Windows and Linux would not be using the same kernel.
Quote:
Originally Posted by Rickkkk
.. my first attempt at a solution would involve removing PulseAudio from the equation. Also, you need to make sure Audacity is properly set up (source, recording levels ...) ...
|
A fine-print problem. I had previously looked at this webpage No Sound Fix Tips which had the end-of-the-world warning below.
Quote:
Note: Cinnamon users should not purge pulseaudio. Use apt install --reinstall pulseaudio instead
|
In researching, I have run across pulseaudio complaints. So there is probably a workaround for how to excise pulseaudio form cinnamon that has been posted somewhere.
Quote:
Originally Posted by Rickkkk
Unless this is a once-in-a-blue-moon thing you're doing (i.e. you don't spend a lot of time on sound conversion or recording with this computer) ...
|
This would be a one-time event, that is solvable under Windows (which I am trying to avoid). I am viewing this as a Linux learning opportunity.
Quote:
Originally Posted by teckk
One solution:
You can make a virtual loopback device and record what is coming through the sound device.
There is a kernel module that allows that. snd-aloop
|
Thanks for that suggestion. Will have to work on it.
|
|
|
12-29-2019, 04:29 PM
|
#5
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Hi again Steve R,
I applaud your wishing to look at this as a Linux learning opportunity. I was determined to find a way to convert my studio from Windows to Linux and eventually got around to it 3 years ago. I actually *did* have a hardware compatibility (M-Audio firewire external sound card) that required I replace that piece of equipment with another sound interface. Since then, I've been using a Linux-based solution.
All this to say that it takes a bit of trial and error getting used to the Linux way of doing things at first. So if you really are just looking to digitize something once, you might be better off using Windows and then deciding how much effort you want to put into getting used to sound capturing on Linux.
Although I understand your reluctance to remove PulseAudio given the warnings you have encountered in your research, you may be able to simple configure Audacity to ignore it and simply use basic Alsa as its source.
Let us know how you're doing.
|
|
|
12-29-2019, 06:29 PM
|
#6
|
Member
Registered: Jun 2009
Location: Cleveland, TN
Distribution: Mint 21.3
Posts: 527
Original Poster
Rep:
|
Quote:
Originally Posted by Rickkkk
I applaud your wishing to look at this as a Linux learning opportunity. I was determined to find a way to convert my studio from Windows to Linux and eventually got around to it 3 years ago. I actually *did* have a hardware compatibility (M-Audio firewire external sound card) that required I replace that piece of equipment with another sound interface. Since then, I've been using a Linux-based solution.
All this to say that it takes a bit of trial and error getting used to the Linux way of doing things at first. So if you really are just looking to digitize something once, you might be better off using Windows and then deciding how much effort you want to put into getting used to sound capturing on Linux.
Although I understand your reluctance to remove PulseAudio given the warnings you have encountered in your research, you may be able to simple configure Audacity to ignore it and simply use basic Alsa as its source.
Let us know how you're doing.
|
The tapes that I have " all of sudden" become consumed with digitizing are approximately 14 years old and essentially untouched. Obviously, I really didn't need them since they have been unused for all this time.
Back-story break for why I got started on this tangent. A person on another forum has a collection of audiobooks on tape. His car does not have a tape deck. So he posted a request for how he could solve this problem. I researched it for him. He is using a Windows based computer.
Anyway, if things don't work-out, I can use Windows, which I would be reluctant to do. Still caught-up with Christmas and end-of-the-year stuff that will be taking-up some time.
Last edited by Steve R.; 12-29-2019 at 06:54 PM.
|
|
|
12-30-2019, 11:18 AM
|
#7
|
Member
Registered: Jun 2009
Location: Cleveland, TN
Distribution: Mint 21.3
Posts: 527
Original Poster
Rep:
|
I'm sitting down at the computer to follow-up. One program that I overlooked discussing in the prior posts above was " Audio Recorder – capture and record audio from any device". The program did not work. Got the same static. More research may prove helpful.
The reason for making this post, is that the website is dated ( "Notice: This repository will not be updated after April 2015 !"). Do not accept the PPA. Read the notes and you will see the following message:
|
|
|
12-30-2019, 04:02 PM
|
#8
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Hi again Steve R,
I realize you have marked this thread as "Solved", but just for the sake of clarity.
I had deduced from your 1st post that you were using Audacity to attempt to record ... In your last post you mention "Audio Recorder", which, from the link you posted, seems to be some Mint applet ... Which application *are* you attempting to use ?
Lastly, to encourage you, I recently finished up a digitizing project where I digitized around 25 old cassette tapes from the late 70's, early 80's (recordings of radio shows I did at college and university .. ) .. The tapes were, for the most part, still viable (if not perfect) and the project was a success .. All under Linux (Arch, in my case ..) with Audacity.
Cheers, and Happy Holidays !
|
|
1 members found this post helpful.
|
12-30-2019, 04:10 PM
|
#9
|
Member
Registered: Jun 2009
Location: Cleveland, TN
Distribution: Mint 21.3
Posts: 527
Original Poster
Rep:
|
Audio Recorder is working!
Apparently you can not have both Audio Recorder and Audacity active at the same time. I loaded Audio Recorder by itself and it successfully recorded. I used " System's default device" as the audio source. There does not appear to be an actual " Line-in" source option.
I did activate Pulseaudio Volume Control. That did not have an adverse effect on the operation of Audio Recorder.
I will take a look at teckk proposed solution.
Thanks for your suggestions and help.
|
|
|
12-30-2019, 04:13 PM
|
#10
|
Member
Registered: Jun 2009
Location: Cleveland, TN
Distribution: Mint 21.3
Posts: 527
Original Poster
Rep:
|
Quote:
Originally Posted by Rickkkk
Hi again Steve R,
I realize you have marked this thread as "Solved", but just for the sake of clarity.
I had deduced from your 1st post that you were using Audacity to attempt to record ... In your last post you mention "Audio Recorder", which, from the link you posted, seems to be some Mint applet ... Which application *are* you attempting to use ?
Lastly, to encourage you, I recently finished up a digitizing project where I digitized around 25 old cassette tapes from the late 70's, early 80's (recordings of radio shows I did at college and university .. ) .. The tapes were, for the most part, still viable (if not perfect) and the project was a success .. All under Linux (Arch, in my case ..) with Audacity.
Cheers, and Happy Holidays !
|
That was FAST!! You responded while I was still typing. I basically loaded each application individually and determined that Audio Recorder and Audacity cannot both be active at the same time. As an additional observation, it appears that Audacity (by itself) will not record at all.
Last edited by Steve R.; 12-30-2019 at 08:08 PM.
Reason: Added Observation that Audacity does not work.
|
|
|
12-30-2019, 05:34 PM
|
#11
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by Steve R.
That was FAST!! You responded while I was still typing. I basically loaded each application individually and determined that Audio Recorder and Audacity cannot both be active at the same time.
|
That makes sense. You can have both installed and choose the one with which you're more comfortable, but having 2 or more applications simultaneously *running* and trying to compete for the same audio source (with PulseAudio thrown in the mix to complicate things even more ..) is likely to yield unsatisfactory results.
Glad you're up and running - best of success with your project.
Come back any time for any Linux-related questions.
|
|
|
All times are GMT -5. The time now is 12:58 AM.
|
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
|
|