smart-mirror icon indicating copy to clipboard operation
smart-mirror copied to clipboard

Lose audio from 3.5mm jack when edited for usb mic

Open nandor690 opened this issue 10 years ago • 15 comments

When I edit the files as suggested in issue #20 I lose audio from the 3.5mm jack. I have try all combinations of editing both files but I can't get them to work at the same time. Forcing it through raspi-config does not help either. Iv also tried mixer set numid=3 1 in Terminal. But both won't work at the same time.

nandor690 avatar Feb 10 '16 14:02 nandor690

I wouldn't be surprised if this was a raspberry pi hardware issue. If I'm not mistaken the audio and USB tracks on the board are linked. That's also the reason why audio is pretty bad if you use one or more USB devices coupled to the board.

kurtdb avatar Feb 15 '16 10:02 kurtdb

I have also tried everything in issue #20. I can get everything working only if I do sudo npm start. Not sure if this is a big deal to have to sudo or not.... i'm a noob :/

dano25 avatar Feb 17 '16 00:02 dano25

Last night I was doing some testing and just that pcm.default.card 1 in the .asoundrc file is making my audio not work when that line is there and when is not my mic goes out but my sound works.

Im not sure if it's possible but this is a guide for general Linux system troubleshooting . https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone

I still haven't tested anything in here but this shows how to make the microphone work amor solve issues with the audio through hdmi.

beto2909 avatar Feb 17 '16 01:02 beto2909

Kurtdb, I was for sure thinking it was something to do with the hardware and how it was connected. Kinda bummed. But I guess I don't really need sound on a mirror......Yet. Lol. I'll take a look at the other things mentioned in the comments

nandor690 avatar Feb 17 '16 07:02 nandor690

Thanks guys

nandor690 avatar Feb 17 '16 07:02 nandor690

I'm struggling with this as well

boss345 avatar Feb 17 '16 15:02 boss345

I switched to the search branch, and plugged in my speakers to see if I got this issue and I did. The only changes I made were in alsa.conf for the mic where I made defaults.pcm.card 1. I'm not sure if there is a conflicting issue with having both ALSA and PulseAudio, but I installed pulse, and after a reboot, sound works fine throughout desktop and mirror. All I did was run sudo apt-get install PulseAudio and after it was finished I did a sudo reboot and it's worked since without any other changes.

See if this works for any of you guys

3y3c0ugh avatar Feb 24 '16 05:02 3y3c0ugh

Awesome. I'll try this when I get home. It snowed pretty good here and modot sucks, so it'll probably take awhile. I'll post my results then

nandor690 avatar Feb 24 '16 13:02 nandor690

I've been investigating PulseAudio as a solution to all of the microphone problems people have been having. While I haven't verified that it works with everything it's a pretty good bet that it's what we'll use going forward.

evancohen avatar Feb 24 '16 18:02 evancohen

http://plugable.com/products/usb-audio would this help the issue?

StevenTLBF avatar Feb 25 '16 21:02 StevenTLBF

It would introduce the same issue. Electron and the ALSA configuration are not playing well together.

evancohen avatar Feb 26 '16 00:02 evancohen

So i did more testing and i still get issues.. If i force audio to 3.5 and then install pulse, sound works fine outside mirror and with mirror. However, once pulse is installed, and I want to switch to say HDMI sound from my TV, i get nothing inside or outside the mirror. BUT if I sudo apt-get autoremove pulseaudio then the sound fixes, forces HDMI sounds, and works outside the mirror but not in the mirror. If HDMI is still forced, and I re-install pulseaudio, HDMI works inside and out the mirror. Strangely, once you force an output and install pulse, thats the only output that works. Until you remove pulse, force the other output, and reinstall pulse.

Edit: Forget one of my main points, the sound only plays for about 15 seconds then cuts out.

3y3c0ugh avatar Feb 26 '16 01:02 3y3c0ugh

You might want to check out this response on GitHub about getting PulseAudio working on the pi with analog output: http://raspberrypi.stackexchange.com/questions/639/how-to-get-pulseaudio-running#answer-4022

evancohen avatar Feb 26 '16 03:02 evancohen

Ok folks, I spent some time on it this evening and got it working. Revert all changes you've made to ALSA conf files (this will be way easier than messing around with those, I promise). Then run:

sudo aptitude install pulseaudio
sudo modprobe snd_bcm2835
sudo amixer cset numid=3 1

That's it. No fancy configuration - nothing to reset after you reboot, everything should just work.

evancohen avatar Feb 26 '16 06:02 evancohen

This works great. You should add this in the troubleshooting section.

beto2909 avatar Feb 26 '16 10:02 beto2909