![]() |
Getting analog audio/sound to work (headphones socket) on debian - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4) +--- Forum: Linux on Pine A64(+) (https://forum.pine64.org/forumdisplay.php?fid=6) +---- Forum: Debian (https://forum.pine64.org/forumdisplay.php?fid=24) +---- Thread: Getting analog audio/sound to work (headphones socket) on debian (/showthread.php?tid=1228) |
Getting analog audio/sound to work (headphones socket) on debian - pfeerick - 06-01-2016 Hi, I've finally started playing with my Pine64+ board, and have been able to get both ubuntu and debian systems up and running thanks to the great work by longsleep and lenny. I am setting up a headless system which will probably be a lightweight webserver / database server for sensors and a few other bits and pieces... not 100% sure yet. However, in the meantime, since I have it sat on my desk atm, I thought it would be fun to hook it up to some internet radio, and let it do that for a while... but how do I get the audio to work? I don't have anything plugged into the HDMI, so can't use that for audio. And nothing seems to be coming out of the headphones jack, although mplayer seems to be playing fine, bar an error about the output device!!! I started with the Debian Base (3.10.65 BSP) image, and applied the Debian Base (3.10.65 BSP) rootfs (although I suspect I didn't actually need too! ![]() Thanks in advance, Pete Code: Connecting to server 80.237.154.83[80.237.154.83]: 8120... Just some further information... I added pulseaudio, and it got rid of the error, but didn't seem to be able to configure it (had no idea what I was doing though either!!). I plugged my computer monitor which has HDMI audio output option, rebooted the pine and tried mplayer again... and it worked, but was clicking. I seemed to remember that that exact issue was the bug report I linked above, so I thought I'd just remove pulseaudio and try without it. Another reboot, and HDMI audio does indeed work, but for the steam I'm using as a test, it only plays the intro file, and then mp3123 gives up... whereas if I play from a SSH terminal with no HDMI audio, it get error messages, but at least it seems to continue onto playing the current track.... RE: Getting analog audio/sound to work (headphones socket) on debian - longsleep - 06-01-2016 Why do you use an old and outdated image? I suggest you use my current Ubuntu Image (see http://forum.pine64.org/showthread.php?tid=376) - also as always search is your friend and the reason why you do no hear anything is here: http://forum.pine64.org/showthread.php?tid=807&pid=7591#pid7591 RE: Getting analog audio/sound to work (headphones socket) on debian - pfeerick - 06-01-2016 Eureka! I'll leave the rest of the post up as it might help someone else with the same issue, but I found that after installing mplayer and pulseaudio, and following the steps in the thread that longsleep posted that it still wasn't working for me on the ubuntu image, but I was getting clicks from the sound card when muting the headphones channel and unmuting it in alsamixer. When comparing it with a desktop ubuntu system, I realised the currently logged in user wasn't in the audio group, which is why I was having to use 'sudo' to run alsamixer, aplay and why pulseaudio --start didn't appear to be doing anything. Adding the user using 'sudo usermod -a -G audio name-of-logged-in-user' and logging it and out fixed it up perfectly! --- I started with that image as it was the only non-gui image on pine64.pro for debian. As I said above, I updated uboot and the kernel, the debain version was at kernel version 3.10.101-4, and the ubuntu image is still at 3.10.101-0-pine64-longsleep as I haven't run the kernel update on it. I tried running through those commands on the debian install, and didn't get any sound coming out of the earphone socket. However I did get clicking sounds from the earpiece when muting/unmuting the headphones channel in alsamixer, so that seems to imply that there is something happening at least. I ran /usr/local/sbin/mplayer-play.sh song.mp3 before installing pulseaudio (again), and got this (and it made no difference if I ran the script or ran mplayer directly): Code: MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team I installed pulseaudio, rebooted and got this: Code: pfeerick@pine64:~$ /usr/local/sbin/mplayer-play.sh song.mp3 It said it was playing, but no sound, so I Ctrl+C'd after about 28 seconds... sudo aplay -l gets me : Code: **** List of PLAYBACK Hardware Devices **** I hopped over to the ubuntu image I was working on, and it doesn't appear to be any different. Please don't tell me I need to switch to a GUI image just to be able to configure the sound properly without having to jump through a dozen hoops??! ![]() And thanks for the link to that thead btw... I was searching for sound, not audio, so no wonder it didn't turn up!! ![]() The below *should* be a complete list of the steps I needed to do get audio / sound working on the earphone / headphone / analog jack on the debian image. I didn't need to install alsa-base or alsa-utils on the ubuntu image, only pulseaudio. Code: sudo apt-get install alsa-base alsa-utils I used mplayer to play a demo mp3 I had downloaded on the pine64, so also did Code: sudo apt-get install mplayer And played the mp3 simply by running Code: mplayer demo.mp3 RE: Getting analog audio/sound to work (headphones socket) on debian - MarkHaysHarris777 - 07-08-2016 hi all, I followed the above steps in the previous post to get sound working on the audiojack (debian 120bsp kernel); and the instructions worked brilliantly ! The sound is wonderful quality; in the preferences-->sound settings I was able to select either the sndhdmi or audiocodec (under the hardware tab) and under the input or output tabs to select the appropriate hardware options for the sound to be routed via hdmi, or audiojack. The video (youtube) was not the best, but the audio was fabulous (crystal clear and actually pleasing, I was impressed). With my setup (since my hdmi monitor has no speakers, only jack) I am forced to move the plug in order to swith between the two hardware options/ but logically the idea is the similar / and in either case the sound (including system sounds) was fine. Pulse Audio, alsa-base, and alsa-utils were on the img already, so I did not have to load those. So, looking forward to a video driver that will make the experience all-round fabulous. good evening ! marcus RE: Getting analog audio/sound to work (headphones socket) on debian - Pander - 10-24-2016 The instruciton above did not work for me on latest stable longsleep Ubuntu. Any pointers on how to get this debugged and working? RE: Getting analog audio/sound to work (headphones socket) on debian - pfeerick - 10-26-2016 (10-24-2016, 03:11 PM)Pander Wrote: The instruciton above did not work for me on latest stable longsleep Ubuntu. Any pointers on how to get this debugged and working? I'll have a look at this tomorrow. AFAIK, most of this shouldn't be needed on Ubuntu. Is this with a headless (non GUI) setup? And what sort of audio are you playing... can you get any audio with the suggested use of mplayer to play a mp3? It might also be worth checking if you have the headphones muted in alsamixer (m for mute/unmute). RE: Getting analog audio/sound to work (headphones socket) on debian - pfeerick - 10-26-2016 Ok, repeated all of the steps I documented above on a clean ubuntu image, and mplayer had no problems at all playing audio (on the headphones jack) - I am currently listening to a MP3 radio stream from my national radio news service. Did you do all of the steps (up to and including the reboot) (repeated below without duplicate sudos, and without scrolling code box). This was using the ethernet - and a clean 20160507-1 ubuntu image - so nothing else has been configured at all. Code: sudo su --->>> Reboot to allow kernel update to take effect Code: sudo su Code: wget https://raw.githubusercontent.com/longsleep/build-pine64-image/master/blobs/asound.state --->>> Reboot to allow module and group changes to take effect Code: mplayer -playlist http://www.abc.net.au/res/streaming/audio/mp3/news_radio.pls RE: Getting analog audio/sound to work (headphones socket) on debian - Birneklub9 - 12-30-2016 [quote pid='21713' dateline='1477541049'] Code: wget https://raw.githubusercontent.com/longsleep/build-pine64-image/master/blobs/asound.state Code: mv asound.state /var/lib/alsa/asound.state --->>> Reboot to allow module and group changes to take effect Code: mplayer -playlist http://www.abc.net.au/res/streaming/audio/mp3/news_radio.pls [/quote] Why do we use ubuntu ? Topic says its for Debain? sorry for my noob question |