Archive

Posts Tagged ‘music’

Listen up, Kubuntu: the enraging tale of sound over HDMI

August 4th, 2013 2 comments

Full disclosure: I live with Kayla, and had to jump in to help resolve an enraging problem we ran into on the Kubuntu installation with KDE, PulseAudio and the undesirable experience of not having sound in applications. It involved a fair bit of terminal work and investigation, plus a minimal understanding of how sound works on Linux. TuxRadar has a good article that tries to explain things. When there are problems, though, the diagram looks much more like the (admittedly outdated) 2007 version:

The traditional spiderweb of complexity involved in Linux audio.

The traditional spiderweb of complexity involved in Linux audio.

To give you some background, the sound solution for the projection system is more complicated than “audio out from PC, into amplifier”. I’ve had a large amount of success in the past with optical out (S/PDIF) from Linux, with only a single trip to alsamixer required to unmute the relevant output. No, of course the audio path from this environment has to be more complicated, and looks something like:

Approximate diagram of display and audio output involved from Kubuntu machine

As a result, the video card actually acts as the sound output device, and the amplifier takes care of both passing the video signal to the projector and decoding/outputting the audio signal to the speakers and subwoofer. Under Windows, this works very well: in Control Panel > Sound, you right-click on the nVidia HDMI audio output and set it as the default device, then restart whatever application plays audio.

In the KDE environment, sound is managed by a utility called Phonon in the System Settings > Multimedia panel, which has multiple backends for ALSA and PulseAudio. It will essentially communicate with the highest-level sound output system installed that it has support for. When you make a change in a default Kubuntu install in Phonon it appears to be talking to PulseAudio, which in turn changes necessary ALSA settings. Sort of complicated, but I guess it handles the idea that multiple applications can play audio and not tie up the sound card at the same time – which has not always been the case with Linux.

In my traditional experience with the GNOME and Unity interfaces, it always seems like KDE took its own path with audio that wasn’t exactly standard. Here’s the problem I ran into: KDE listed the two audio devices (Intel HDA and nVidia HDA), with the nVidia interface containing four possible outputs – two stereo and two listed as 5.1. In the Phonon control panel, only one of these four was selectable at a time, and not necessarily corresponding to multiple channel output. Testing the output did not play audio, and it was apparent that none of it was making it to the amplifier to be decoded or output to the speakers.

Using some documentation from the ArchLinux wiki on ALSA, I was able to use the aplay -l command to find out the list of detected devices – there were four provided by the video card:

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0

and then use aplay -D plughw:1,N /usr/share/sounds/alsa/Front_Center.wav repeatedly where N is the number of one of the nVidia detected devices. Trial and error let me discover that card 1, device 7 was the desired output – but there was still no sound from the speakers in any KDE applications or the Netflix Desktop client. Using the ALSA output directly in VLC, I was able to get an MP3 file to play properly when selecting the second nVidia HDMI output in the list. This corresponds to the position in the aplay output, but VLC is opaque about the exact card/device that is selected.

At this point my patience was wearing pretty thin. Examining the audio listing further – and I don’t exactly remember how I got to this point – the “active” HDMI output presented in Phonon was actually presented as card 1, device 3. PulseAudio essentially grabbed the first available output and wouldn’t let me select any others. There were some additional PulseAudio tools provided that showed the only possible “sink” was card 1,3.

The brute-force, ham-handed solution was to remove PulseAudio from a terminal (sudo apt-get remove pulseaudio) and restart KDE, presenting me with the following list of possible devices read directly from ALSA. I bumped the “hw:1,7″ card to the top and also quit the system tray version of Amarok.

A list of all the raw ALSA devices detected by KDE/Phonon after removing PulseAudio.

A list of all the raw ALSA devices detected by KDE/Phonon after removing PulseAudio.

Result: Bliss! By forcing KDE to output to the correct device through ALSA, all applications started playing sounds and harmony was restored to the household.

At some point after the experiment I will see if I can get PulseAudio to work properly with this configuration, but both Kayla and I are OK with the limitations of this setup. And hey – audio works wonderfully now.




I am currently running various *BSD variants for this Experiment.
I currently run a mix of Windows, OS X and Linux systems for both work and personal use.
For Linux, I prefer Ubuntu LTS releases without Unity and still keep Windows 7 around for gaming.
Check out my profile for more information.

The apps of KDE 4.10 Part IV: Amarok

April 25th, 2013 No comments

Ready to rock out with KDE’s premier music management application? Let’s rediscover our music with Amarok.

Amarok

I have to start by first admitting that I’ve actually run Amarok once or twice in the past, but sadly could never really figure it out. This always bothered me because people who can figure it out seem to love it. So I made it my mission this time around to really dig into the application to see what all the noise was about (poor pun intended).

 

Rediscover Your Music

Rediscover Your Music

Starting with the navigation pane on the left hand side of the screen I drilled down into my Local Music collection. For the purposes of testing I just threw two albums in my Music folder.

The navigation panel

The navigation panel

Double clicking Local Music opens up a view into your Music folder that lets you play songs or search through your artists and albums.

Local media list

Local media list

When you play a song the main portion in the center of the application changes to give you a ton of information about that track.

Automatically pulls lyrics and other information from the web

Automatically pulls lyrics and other information from the web

This is actually a pretty neat feature but also has the downside that its not always correct. For instance when I started playing the above song by the 90s band Fuel I ended up getting shown the following Wikipedia page about fuel (i.e. an energy source) and not the correct page about the band.

I don't think that's right...

I don’t think that’s right…

Placing a CD in the computer caused it to appear under Local Media (although under a different section). Importing tracks was very straight forward; simply right-click on the CD and choose Copy to Collection -> Local Collection. You then get to pick your encoding options (which you can deeply customize to fit your needs).

Pick your encoding format and go

Pick your encoding format and go

For Internet media Amarok comes loaded with a number of sources including a number of streaming radio stations, Jamendo, Last.fm, Librivox.org, Magnatune.com, Amazon’s MP3 store and a podcast directory. Like most other media, Amarok also tries to display relevant information about what you’re listening to.

Internet Radio

Internet Radio on Amarok

There are loads of other features in Amarok, from its excellent playlist support to loads of expandable plugins, but writing about all of them would take all day. Instead I will wrap up here with a few final thoughts.

Is Amarok the best media manager ever made? To some maybe, but I still find its interface a bit too clunky for my liking. I also noticed that it tended to take up quite a bit of RAM (~220MB currently) which puts it on the beefier side of the media manager resource usage spectrum. The amount of information that it presents about what you’re currently listening to is impressive, but often times when I’m listening to music I’m doing so as a background activity. I don’t foresee a situation where I would be actively watching Amarok in order to benefit from its full potential as a way to ‘rediscover my music’. Still, for at least its deep integration within the KDE desktop, I say give it a try and see if it works for you.

More in this series




I am currently running a variety of distributions, primarily Ubuntu 14.04.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.
Categories: KDE, Linux, Tyler B Tags: , ,

Listener Feedback Podcast Update

July 22nd, 2012 No comments

Five new Listener Feedback podcast episodes have been released in case you missed them:

And as always you can grab the MP3 or Ogg version of this Creative Commons podcast.




I am currently running a variety of distributions, primarily Ubuntu 14.04.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

Listener Feedback Podcast Episode 10: Bill Borman

June 10th, 2012 No comments

A new episode of the Listener Feedback podcast has been released. This episode features the folk rock artist Bill Borman with his Creative Commons album In Our Dreams We’re Flying. Download it here.




I am currently running a variety of distributions, primarily Ubuntu 14.04.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

Listener Feedback Podcast Episode 9: DirtyOldSpice

May 29th, 2012 No comments

A new episode of the Listener Feedback podcast has been released. This episode features the German rock band DirtyOldSpice with their Creative Commons album Follow The Traveler. Download it here.




I am currently running a variety of distributions, primarily Ubuntu 14.04.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

Listener Feedback Podcast Episode 8: Futuristic Sex Robotz

May 21st, 2012 No comments

A new episode of the Listener Feedback podcast has been released. This episode features the Internet nerdcore gangster rap super group Futuristic Sex Robotz with their album Hotel Coral Essex. Download it here.




I am currently running a variety of distributions, primarily Ubuntu 14.04.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

Listener Feedback Podcast Episode 7: Fresh Body Shop

May 21st, 2012 No comments

A new episode of the Listener Feedback podcast has been released. This episode features the industrial group Fresh Body Shop with their album Doctor X. Download it here.




I am currently running a variety of distributions, primarily Ubuntu 14.04.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

Listener Feedback Podcast Episode 6: Josh Woodward

May 1st, 2012 No comments

A new episode of the Listener Feedback podcast has been released. This episode features the extremely talented acoustic rock artist Josh Woodward with his album Dirty Wings. Download it here.




I am currently running a variety of distributions, primarily Ubuntu 14.04.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

Listener Feedback Podcast Episode 5: Slim

April 29th, 2012 1 comment

A new episode of the Listener Feedback podcast has been released. This episode features the extremely talented one-man rock band Slim with his album Interstate Medicine. Download it here.




I am currently running a variety of distributions, primarily Ubuntu 14.04.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

Listener Feedback Podcast Episode 4: Tryad – Listen

April 16th, 2012 No comments

A new episode of the Listener Feedback podcast has been released. On this episode it is the international internet supergroup Tryad with their album Listen. Check it out here.




I am currently running a variety of distributions, primarily Ubuntu 14.04.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.