LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-15-2021, 04:41 AM   #1
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Unexpected crash in alsa. Can someone explain this?


I don't understand audio but I am increasingly obliged to use audio software to help with the online operations of my parish church. I have alsa-utils and I have recently installed sox on the advice of someone here; I must say I am greatly impressed with what it can apparently do.

I am trying to use alsamixer to improve my sound recording quality, but I don't understand audio terminology, so the man pages and display captions are about as informative for me as if they were written in a foreign language. So I decided to just try modifying one alsamixer column at a time to see what the effect would be on a test recording. That way, I hoped, I could find out what the captions actually mean.

Then suddenly alsa went on strike. Every attempt to record produced this:
Code:
ALSA lib pcm_dsnoop.c:589:(snd_pcm_dsnoop_open) unable to create IPC shm instance
arecord: main:786: audio open error: Cannot allocate memory
I ran top and that didn't suggest any great demands on memory. All the same, I shut down everything else and tried again. Nothing doing!

Googling the error produced only references to an occasional bug that had been cleared up, and to someone using Fedora who got that error only when he used audio as an unprivileged user. Just to check, I did it again as root and got the same result. So I shut down in disgust.

This morning everything works normally, but for how long? What did I do to create that error? And what should I do to stop it happening again?

Last edited by hazel; 01-15-2021 at 08:49 AM.
 
Old 01-15-2021, 12:46 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I'd move alsa out of the way, & reinstall from scratch, esp. the configs. Then start over

The ones I'd concern myself with are Main; The one beside it(=analog) &pcm(=digital).I wuldn't use mic_boost unless absolutely needed, & most do nothing. I imagine it's the config screwing up your system.

Last edited by business_kid; 01-15-2021 at 12:47 PM.
 
Old 01-15-2021, 01:00 PM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574

Original Poster
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
It hasn't happened again (so far).

The attached is the capture interface for my card. If someone could just explain to me what the captions along the bottom mean, that would be a good start. They don't seem to correspond to the ones business_kid mentions.

I'm using it to record my cello and I need to boost the mic, otherwise it is just too quiet.
Attached Thumbnails
Click image for larger version

Name:	alsamixer2.png
Views:	12
Size:	7.3 KB
ID:	35283  

Last edited by hazel; 01-15-2021 at 01:01 PM.
 
Old 01-16-2021, 04:00 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
The ones I mentioned were playback options. You're showing a screen of (Input) mixer options - have you a mixer installed.

If that's the case, I'd give them all 30%, start playing with stuff trying to get sound out and turning up as necessary. If you only get silence, try 50%. But it's easy to get feedback. Give no volume to any mic boost. Capture is stereo in and line is some mixer point where the inputs are summed, typically 0-200mV, before amplification.
 
Old 01-16-2021, 05:05 AM   #5
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574

Original Poster
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Quote:
Originally Posted by business_kid View Post
I'd give them all 30%, start playing with stuff trying to get sound out and turning up as necessary. If you only get silence, try 50%. But it's easy to get feedback. Give no volume to any mic boost. Capture is stereo in and line is some mixer point where the inputs are summed, typically 0-200mV, before amplification.
Whoa! That's all Greek to me, especially the last sentence.

What I am trying to do is record the sound of my cello. That's why I attached alsamixer's input interface. At present the recorded sound is very quiet and I would like to make it louder. Having the microphone very close doesn't seem to have a good effect; it picks up the small reverberations that the strings make when I take my finger off them (which is something you don't usually hear and certainly don't want to hear). So placing it further away and using some kind of gain or boost seems to be the way to go.

I have two input sockets, one at the front and one at the back. I gather that they can accept either a microphone lead or a line in from an external device such as a CD player, and that alsa needs to know which it is because a mic gives a very weak signal which needs an automatic boost. So the two columns labelled Source and Source1 have three values each: front mic, rear mic and line. I also assume that the two Capture columns are to boost these two sources. So if I am using the front socket only and plugging a mic into it, Source should be set to "Front mic" and Capture1 should be switched off because Source1 is not in use. Am I right so far?

The Front mic, Line and Rear Mic columns are obviously for boosting; I assume that in my setup only Front mic is active so there is no point in setting the others. But what is the practical difference between increasing Front mic and increasing Capture? That is the most important thing I need to know right now.

Last edited by hazel; 01-16-2021 at 05:07 AM.
 
Old 01-16-2021, 05:33 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
I often wonder if people would be (more) happy with an expected crash.

Maybe it's just my propensity for cryptic crosswords surfacing ...
 
Old 01-16-2021, 05:43 AM   #7
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574

Original Poster
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Quote:
Originally Posted by syg00 View Post
I often wonder if people would be (more) happy with an expected crash.
Yes, of course they would! If you know that a program reliably crashes when you do a certain thing, you just don't do it. Problem solved!
 
Old 01-17-2021, 08:40 AM   #8
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574

Original Poster
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
It happened again today! Just as I was about to make my final recording. Grr!

It affects only recording. I can play files back, and I can use sox to convert a file into a different format. That must mean that the shared memory which is not being allocated was requested by the device on the sound card that does input processing. But why is it not being allocated and what am I supposed to do about it (apart from rebooting)?

Something else weird which must surely be connected. When I look at the alsamixer capture controls, there is a column labelled "Digital". I remember that it was there when this problem first appeared. But yesterday when the sound card was behaving quite normally, that column was absent. What does the column represent and why is its appearance such a bad omen?

PS This seems to be Alsa's description of it:
Code:
 control.39 {
                iface MIXER
                name 'Digital Capture Volume'
                value.0 60
                value.1 60
                comment {
                        access 'read write user'
                        type INTEGER
                        count 2
                        range '0 - 120'
                        tlv '0000000100000008fffff44800000032'
                        dbmin -3000
                        dbmax 3000
                        dbvalue.0 0
                        dbvalue.1 0
                }
        }
Attached Thumbnails
Click image for larger version

Name:	new_alsamixer_capture.png
Views:	7
Size:	7.4 KB
ID:	35295   Click image for larger version

Name:	alsamixer2.png
Views:	7
Size:	7.3 KB
ID:	35296  

Last edited by hazel; 01-17-2021 at 09:56 AM. Reason: Added PS
 
Old 01-17-2021, 11:47 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Have you tried removing control 39 from the config? Also, there's some sound-editing thing (Audacious?) that might tidy things up for you. Have a look at it.
 
Old 01-17-2021, 12:08 PM   #10
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574

Original Poster
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Quote:
Originally Posted by business_kid View Post
Have you tried removing control 39 from the config?
I made a new version of /etc/asound.state without that section in it and stored it in my home directory. Then I ran alsactl restore -f .asound.state. But alsamixer still shows a "Digital" column and recording still doesn't work.
Quote:
Also, there's some sound-editing thing (Audacious?) that might tidy things up for you. Have a look at it.
I don't want any extra sound software until I have discovered a way to make my existing software work. alsa is absolutely basic; every other package sits on top of it.
 
Old 01-18-2021, 03:50 AM   #11
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574

Original Poster
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Red herring alert!

Today recording works. When I first put up alsamixer this morning, there was no digital capture column displayed. Now there is one. It seems that it takes time to come up. But recording still works (so far!)

I used alsactl to save the current state. We'll see if restoring to that state solves any future problems.

I solved my recording problem by reversing the method: I recorded my cello part on the laptop while playing the backing track on the desktop machine. So at least I have that off my to-do list. But I don't like being dependent on software that fails in ways I don't understand. After all, that was one reason why I left Windows all those years ago.

Last edited by hazel; 01-18-2021 at 04:02 AM.
 
Old 01-18-2021, 06:58 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Quote:
Originally Posted by hazel
But I don't like being dependent on software that fails in ways I don't understand. After all, that was one reason why I left Windows all those years ago.
Ah yes, I remember it well. There's a song that uses those words but doesn't mean it.

Back then the only way to understand windows was to join M$.

Glad you're going.
 
Old 02-16-2021, 08:19 AM   #13
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574

Original Poster
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Today it happened again, and in a way that shows it is definitely an intermittent thing. I was again recording for my church, a reading this time. The first two attempts ran OK more or less but little things went wrong (as they do), so I was just doing it over again. And the third time I tried, I got this same error. It just popped up out of the blue and I hadn't made any changes that might have caused it. I tried two or three times and got the same error each time.

So I got out the laptop, recorded on that and copied it over with scp. Then I thought I'd try to play it over as a final check before mailing it. And it played normally. All in a space of 10 minutes or so. So it's a thing which just happens sometimes but once it happens it goes on happening. Then you let it rest and it stops again, without a reboot.

Does that give anyone a better idea of what might be causing it? Because it's a bloody nuisance when your audio packs up sometimes for no apparent reason just when you want to use it.
 
Old 02-16-2021, 11:31 AM   #14
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
All hardware errors like that are timing issues. But I don't suspect hardware.

Could thermal throttling or latency cause it, e.g. your system starts in turbo mode, and then slows down as the cpu heats, or some such? Maybe a caching issue?
 
Old 02-16-2021, 11:35 AM   #15
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574

Original Poster
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
What's turbo mode and how can I find out if I'm using it? I remember that one of the first computers I ever used had a button on the case labelled turbo but I never used it and I've never seen that button on another machine.
 
  


Reply



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
crash () { crash|crash& }; crash grob115 Linux - Security 6 05-07-2011 03:06 AM
can someone explain why I can not get ls-l to show directory? mhg Linux - Newbie 11 10-28-2008 12:18 AM
Crash, Crash, Crash, Crash and You Guessed it Crash! little_penguin SUSE / openSUSE 8 07-04-2005 09:34 AM
Can someone explain to me why I would need ALSA? Royle Linux - Newbie 7 01-11-2005 03:16 AM
xmms crash xine crash mplayer crash paledread Linux - Software 9 03-09-2004 07:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:00 PM.

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