Archive

Posts Tagged ‘audio’

Fix annoying high-pitched sound

November 28th, 2013 No comments

If you’re like me you’ve been suffering through a crazy high-pitched sound emanating from your laptop speakers. Apparently this is a common issue with certain types of audio devices. Thankfully via the power of the Internet I’ve been able to finally find a solution!

It turns out that the issue actually stems from some power saving features (of all things) in the Intel HDA driver. So I simply turned it off and guess what? It worked.

1) Open up (using root) /usr/lib/pm-utils/power.d/intel-audio-powersave

2) Replace or comment out the line:

INTEL_AUDIO_POWERSAVE=${INTEL_AUDIO_POWERSAVE:-true}

3) In its place put the line:

INTEL_AUDIO_POWERSAVE=false

4) Reboot

Hopefully this also works for you but if not check out the site I found the solution at for some additional tips/things to try.




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.

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.

Linux Multimedia Studio on Ubuntu 10.04

July 31st, 2011 1 comment

Recently, Tyler linked me to Linux Multimedia Studio, a Fruityloops-type application for Linux. Since I’m big into music recording and production, he figured that I’d be interested in trying it out, and he was right. Unfortunately, the developers of same were not as interested.

To start off, I installed the application from a PPA with the following terminal commands:

sudo apt-add-repository ppa:dns/sound
sudo aptitude update
sudo aptitude install lmms

After the install process finished, I tried to launch the application from the command line, only to see a bunch of nasty error messages:

jonf@THE-LINUX-EXPERIMENT:~$ sudo lmms
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
Segmentation fault

I dumped the errors into Google, and found a helpful thread on the Ubuntu forums that suggested that I uninstall Bluetooth Audio Services from my machine. Since I don’t use bluetooth audio in any capacity, I happily obliged. When finished, my list of installed items with Bluetooth in the name looked like this:

A list of installed software matching the search term "bluetooth" in Ubuntu Software Centre

Unfortunately, I didn't think ahead enough to note down the names of the packages that I uninstalled.

After ridding myself of Bluetooth audio support, I tried to launch the application again. Unfortunately, I got another Segmentation fault error:

jonf@THE-LINUX-EXPERIMENT:~$ sudo lmms
Segmentation fault

Reading on in the thread, I saw somebody suggest that I check the dmesg tail for messages pertaining to the crash:

jonf@THE-LINUX-EXPERIMENT:~$ dmesg | tail
[  233.302221] JFS: nTxBlock = 8192, nTxLock = 65536
[  233.314247] NTFS driver 2.1.29 [Flags: R/O MODULE].
[  233.343361] QNX4 filesystem 0.2.3 registered.
[  233.367738] Btrfs loaded
[ 2233.118020] __ratelimit: 33 callbacks suppressed
[ 2233.118026] lmms[10706]: segfault at 7f241c7fdd80 ip 00007f241c7fdd80 sp 00007f24187f8a38 error 14 in zm1_1428.so[7f241ca01000+1000]
[ 2523.015245] lmms[10808]: segfault at 7fd80e9bcd80 ip 00007fd80e9bcd80 sp 00007fd80a9b7a38 error 14 in zm1_1428.so[7fd80ebc0000+1000]
[ 2671.323363] lmms[10845]: segfault at 7fbe39a77d80 ip 00007fbe39a77d80 sp 00007fbe35a72a38 error 14 in zm1_1428.so[7fbe39c7b000+1000]
[ 2836.885480] lmms[11246]: segfault at 7f885b71ed80 ip 00007f885b71ed80 sp 00007f8857719a38 error 14 in zm1_1428.so[7f885b922000+1000]
[ 3039.773287] lmms[11413]: segfault at 7ff83056ed80 ip 00007ff83056ed80 sp 00007ff82c569a38 error 14 in zm1_1428.so[7ff830772000+1000]

On the last few lines, you can see that the error was thrown in a module called zml_1428.so. A bit of Googling turned up the fact that this module is a part of the LADSPA (Linux Audio Developers Simple Plugin API) stack, which provides developers with a standard, cross-platform API for dealing with audio filters and effects.

Scrolling down in the aforementioned thread, I found a post that suggested that I kill all PulseAudio activities on my system before attempting to run the application. PulseAudio is another part of the Linux audio layer that allows user-land applications to talk to your sound hardware via a simple API. It also provides some effects plugins and mixdown capabilities. I went ahead and killed the PulseAudio server on my machine with the following command:

jonf@THE-LINUX-EXPERIMENT:~$ killall pulseaudio

After executing this command, I still got a Segmentation fault when starting LMMS under my user account, but did actually get to a Settings panel when running it with Sudo:

jonf@THE-LINUX-EXPERIMENT:~$ sudo lmms
Home directory /home/jfritz not ours.
ALSA lib pcm_dmix.c:1010:(snd_pcm_dmix_open) unable to open slave
Playback open error: Device or resource busy
Expression 'snd_pcm_hw_params_set_buffer_size_near( self->pcm, hwParams, &bufSz )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1331
Expression 'PaAlsaStreamComponent_FinishConfigure( &self->playback, hwParamsPlayback, outParams, self->primeBuffers, realSr, outputLatency )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1889
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1994
Couldn't open PortAudio: Unanticipated host error
Home directory /home/jfritz not ours.
Home directory /home/jfritz not ours.

Although the output appeared to be riddled with audio layer errors, and the Audio Settings tab of the Setup panel gave me a clue as to why:

Notice how the Audio Interface setting in that image says “Pulse Audio (bad latency!)”. I would hazard a guess that the latency issues with PulseAudio have something to do with the fact that I killed it just prior to getting this damned thing to launch. When I hit the OK button, I was able to see the application, but there was no sound.

Figuring that sound was a necessary component of an audio production application, I booted back to the Setup menu, and told the app to funnel its audio through JACK instead of PulseAudio. The JACK Audio Connection Kit is another sound subsystem, kind of like PulseAudio, that provides an API that developers can use to interface with a machine’s audio hardware. Because of its low latency performance, JACK is often considered to be the standard API for high-quality audio recording and production apps. Unfortunately, it doesn’t work worth a damn in LMMS:

jonf@THE-LINUX-EXPERIMENT:~$ sudo lmms
jackd 0.118.0
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

no message buffer overruns
JACK compiled with System V SHM support.
loading driver ..
SSE2 detected
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
SSE2 detected
all 32 bit float mono audio port buffers in use!
cannot assign buffer for port
cannot deliver port registration request
no more JACK-ports available!
No audio-driver working - falling back to dummy-audio-driver
You can render your songs and listen to the output files...
Home directory /home/jfritz not ours.
Home directory /home/jfritz not ours.
the playback device "hw:0" is already in use. Please stop the application using it and run JACK again
cannot load driver module alsa
Home directory /home/jfritz not ours.

Having dealt with JACK on a previous install, I had one more trick up my sleeve in my effort to get this bastard application to make a sound. I installed the JACK Control Panel from the Ubuntu Software Centre. It’s a QT app that interfaces with the JACK server and allows you to modify settings and stuff.


With it installed, I pressed the big green (or is it red – I’m colour blind, and hate when developers use these two colours for important status messages) Start button, only to encounter some nasty errors:


That might be a problem. I hit the messages button and found a message advising me to make a change to the /etc/security/limits.conf file so that JACK would be allowed to use realtime scheduling:

JACK is running in realtime mode, but you are not allowed to use realtime scheduling.
Please check your /etc/security/limits.conf for the following lines
and correct/add them:
@audio - rtprio 100
@audio - nice -10
After applying these changes, please re-login in order for them to take effect.
You don't appear to have a sane system configuration. It is very likely that you
encounter xruns. Please apply all the above mentioned changes and start jack again!

I figured that it was worth a shot, considering how far I’ve already gone just to try out a piece of software that I don’t really even need. I made the requested changes in the config file, restarted my machine and tried again… only to be greeted by the same damned error message.

At this point, I decided to give up on LMMS. It’s too damned complicated, and ultimately not worth my time. Perhaps when they release a version that I can install and start using without an hour of troubleshooting, I’ll come back and give it another shot. In the mean time, if you’re looking for a decent drum machine with more than a few tricks up its sleeve, check out Hydrogen Drum Machine. It works very well, and I’ve created some neat stuff in it.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

Fix PulseAudio loopback delay

July 1st, 2011 12 comments

Sort of a follow up (in spirit) to two of Jon’s previous posts regarding pulse audio loopback; I noticed that there was quite a bit of delay (~500ms to 1second) in the default configuration and began searching for a way to fix it. After some research I found an alternative way to achieve the loopback but with must less delay.

1. Install paman

First install the PulseAudio Manager application so that you can correctly identify the input device (i.e. your mic or line-in) and your output device (i.e. the sound card you are using).

sudo apt-get install paman

You can find the input sources under the Sources section and the output devices under the Sinks section of the Devices tab. Make note of the names of the two devices.

2. Unload any previous loopback modules

If you had followed Jon’s previous posts then you will need to unload the modules (and potentially change your PulseAudio configuration so they don’t get loaded again on next restart). This is to stop it from doubling all loopback sound.

3. Create an executable script

Create a script and copy the following command into it:

pacat -r --latency-msec=1 -d [input] | pacat -p --latency-msec=1 -d [output]

where [input] is the name of your input device found in step 1 and [output] is the name of the output device. In my case it would look like:

pacat -r --latency-msec=1 -d alsa_input.pci-0000_05_02.0.analog-stereo | pacat -p --latency-msec=1 -d alsa_output.pci-0000_05_02.0.analog-surround-51

4. Run script

By simply running the script now you should get correct loopback and with much less delay than using the default loopback module. Even better if you set this script to run at startup you won’t have to worry about it ever again.




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.

My Search for the Best Audio Editing Software

October 6th, 2010 7 comments

Lately, I’ve been doing some audio recording. In addition to a couple of podcasts that I work on, I occasionally like to record my own musical compositions. While there seems to be no shortage of high-end audio editing applications on either Windows or Mac, the situation on Linux is a bit more sparse. Faced with some frustration, I went out and downloaded a number of linux-based audio editors. I used Wikipedia to find the software in the tests below, and following are my totally subjective and highly biased reviews of each.

Each piece of software was used to edit some raw recordings from a podcast that I have been involved with lately. This source material is almost 100% spoken word, with some music and sound effects sprinkled throughout. It’s important to note these details, as your needs may vary drastically depending on the type of audio project that you’re working on.

Audacity:

The Audacity Project is kind of the Linux standard for non-professional audio editing. It was the first application that I tried to use, mainly because I was familiar with earlier versions of the program that I had once used back in my Windows days. Audacity includes a great number of features that make it ideal for post-processing of any audio project, including a wide array of effects, some great noise generators, and a few analysis tools that make it perfect for cleaning up your finished file before publication.

Audacity audio editor with a demo project loaded

Audacity audio editor with a demo project loaded

Unfortunately, I found that it lacked a usable GUI for editing podcast material. In particular, it seems to be missing the ability to edit a single track in a multi-track project without unduly affecting the other tracks.By default, if you use the selection tool to grab a portion of audio that ought to be deleted from one track in the project, it seems to delete that portion of audio from all tracks in the project.

I found this out the hard way when I played back the master track that I had assembled my finished podcast on, only to find out that significant portions of the audio had mysteriously gone missing at some point during the editing process.

To make matters worse, I closed the application, lost the undo record for the project, and had to start the editing process from the beginning.

This lack of GUI polish also exhibits itself in the way that you can interact with the audio tracks themselves. Unlike in most DAW solutions, a portion of audio that has been clipped out of a larger track cannot seemingly be moved around in the project by clicking on it and dragging it across the stage with the mouse. At least I couldn’t figure out how to do it, and ended up relying heavily on my cut, copy, and paste functions to edit my project. This is a poor way to work on a project of any kind of complexity, and makes projects that rely on audio loops a pain to assemble.

Ardour:

Where Audacity is suited more towards hobbyist recording setups, Ardour aims to be a professional audio solution that is capable of competing with mainstream software like ProTools. It is a fully featured audio suite that can allegedly do most everything that you may require, but as such, can also confuse the hell out of first-time users with its complicated GUI and lengthy manual.

Granted, this is hardly a slight to the project, because it really isn’t suited to my needs. It is a pro-level audio environment that can be used as the centrepiece to a full recording studio or stage

Ardour wants sole control of my audio interface

Ardour wants sole control of my audio interface

show. If you just want to edit a podcast, it may not be the tool for you. As such, if the GUI seems challenging and you find the documentation to be long-winded, you may just be using the wrong tool for the job.

The biggest issue that I had with this piece of software was getting it to run at all on my machine. It uses JACK to attach itself to your audio interfaces in the name of providing a perfect sampling environment that doesn’t get slowed down by having to share the interface with other pieces of software.

Unfortunately, this means that in order to use it, I had to quit all other processes that are capable of generating sound, including this web browser. This is a pain if you are trying to run Ardour in a multi-application environment, or need to reference the internet for anything while working.

After reading the introductory documentation and adjusting the settings in the startup dialog for about 15 minutes, I simply gave up on Ardour without ever managing to get into a workspace. It seems to be far too complicated for my needs, and doesn’t seem worth my time. Your mileage may vary.

Jokosher:

From the moment that I started reading about this project, I like the sound of it. Jokosher is a multi-track recoding and editing environment built on top of Python and GStreamer that was

Jokosher may look cartoony, but it may be exactly what you need for small projects

Jokosher may look cartoony, but it may be exactly what you need for small projects

created by a podcaster who was unsatisfied with the audio editing tools that were available on Linux. The application focuses on being easy enough to use that non-technical people like musicians can pick it up and get their ideas down with minimal hassle. Think of it as Garage Band for Linux.

Indeed, just as the website promised, I was able to get a working environment set up in a matter of minutes. The editing tools allow for splitting the audio, grabbing it and moving it around, and non-destructively editing multiple tracks at the same time (I’m looking at you, Audacity). The GUI also has a beautiful polish to it that, although a tad cartoony, really makes the program look and feel simple. For editing something like a podcast, I’m not sure that this application can be beat.

The only issue that I encountered in my short time using Jokosher was with its support of LADSPA plugins. These are free audio plugins that can be used to apply effects to the different tracks of your audio project. When I tried to use them from within the application, it instructed me to download some from my repositories. Upon checking Synaptic, I saw that I already had a number of them downloaded. Even after installing more, the program did not seem to pick them up.

All in all, this project lived up to its hype, and I will most certainly take some time to break it in, and may write a more in-depth review once I get used to it. If you’re doing podcasting, you owe it to yourself to check this app out.

In Conclusion:

Each of the three applications that I tried to work with while writing this piece deserve your respect. The underlying audio framework of most Linux systems is a veritable rats’ nest of subsystems, platforms, daemons, plugins and helper applications. I would wager a significant amount of money on this situation as the reason that we don’t have ProTools and its ilk on our platform of choice. I’ve done a little bit of work with GStreamer, and even it, as perhaps the prettiest and best supported of all audio libraries on the platform, left me scratching my head at times.

When choosing audio software, it’s important to keep in mind that you need a tool that’s uniquely suited to your project. Since I’m editing podcasts and fooling around with drum loops and samples of my guitars, Jokosher does just about everything that I need and more. I may use Audacity for post-production, or to record my source audio (simply because I haven’t tried recording in Jokosher yet – I know that Audacity works), because it falls somewhere in between a simple editing tool and an advanced platform. Ardour, meanwhile, is probably suited towards the more hard-core audio engineer slash system administrator types who are so fanatic about recording quality that they are willing to sacrifice an entire box for running their DAW software. It’s simply more power than the majority of hobbyist enthusiasts really needs.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

Trying Mint – I likes what I sees.

January 16th, 2010 8 comments

While my initial plan for January was to stick with Windows 7 and perhaps try out Fedora 12, a bad DVD interrupted the Fedora install progress. Out of sheer convenience, I’d planned on running Linux Mint in a VM and had pulled the ISO earlier in the week. “Aha!” I thought. “I’ll install this instead of Fedora and see what’s what.”

My initial impressions are that Mint is perhaps the first Linux distribution that I’d enjoy using on a day-to-day basis. With only a few minor tweaks (activating multiple monitors and using optical out for sound), I have a completely functional desktop environment. Compiz is totally integrated into the experience, degrades gracefully if needed, and is used to enhance the UI rather than provide unneeded eye candy.

Taking a page out of Jon’s book, I also installed Banshee for media playback. What a difference from previous media player experiences – my BlackBerry was automatically detected, synced with my library and folders were built properly in the MediaCard/BlackBerry/music directory. Now, all I need is some better music and I’ll be set!




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.

Pulse Audio Nonsense

January 4th, 2010 3 comments

Just a heads up: This isn’t the kind of post that contains answers to your problems. It is, unfortunately, the kind of post that contains a lot of the steps that I took to fix a problem, without much information about the order in which I performed them, why I performed them, or what they did. All that I can tell you is that after doing some or all of these things in an arbitrary order, stuff seemed to work better than it did before.

It’s funny how these posts often seem to come about when trying to get hardware related things working. I distinctly remember writing one of these about getting hardware compositing working on Debian. This one is about getting reliable audio on Kubuntu 9.10.

You see, I have recently been experiencing some odd behaviour from my audio stack in Kubuntu. My machine almost always plays the startup/shutdown noises, Banshee usually provides audio by way of GStreamer, videos playing in VLC are sometimes accompanied by audio, and Flash videos almost never have working sound. Generally speaking, restarting the machine will change one or all of these items, and sometimes none. The system is usuable, but frustrating (although I might be forgiven for saying that having no audio in Flash prevents me from wasting so much time watching youtube videos when I ought to be working).

Tonight, after some time on the #kubuntu IRC channel and the #pulseaudio channel on freenode, I managed to fix all of that, and my system now supports full 5.1 surround audio, at all times, and from all applications. Cool, no? Basically, the fix was to install some PulseAudio apps:

sudo apt-get install pulseaudio pavucontrol padevchooser

Next, go to System Settings > Multimedia, and set PulseAudio as the preferred audio device in each of the categories on the left. Finally, restart the machine a couple of times. If you’re lucky, once you restart and run pavucontrol from the terminal, you’ll see a dialog box called Volume Control. Head over to the Configuration tab, and start choosing different profiles until you can hear some audio from your system. Also, I found that most of these profiles were muted by default – you can change that on the Output Devices tab. If one of the profiles works for  you, congratulations! If not, well, I guess you’re no worse off than you were before. I warned you that this was that kind of post.

Also, while attempting to fix my audio problems, I found some neat sites:

  • Colin Guthrie – I spoke to this guy on IRC, and he was really helpful. He also seems to write a lot of stuff for the PulseAudio/Phonon stack in KDE. His site is a wealth of information about the stack that I really don’t understand, but makes for good reading.
  • Musings on Maintaining Ubuntu – Some guy named Dan who seems to be a lead audio developer for the Ubuntu project. Also a very interesting read, and full of interesting information about audio support in Karmic.
  • A Script that Profiles your Audio Setup – This bash script compiles a readout of what your machine thinks is going on with your audio hardware, and automatically hosts it on the web so that you can share it with people trying to help you out.
  • A Handy Diagram of the Linux Audio Stack – This really explains a lot about what the hell is going on when an application tries to play audio in the Linux.
  • What the Linux Audio Stack Seems Like – This diagram reflects my level of understanding of Linux audio. It also reminds me of XKCD.
  • Ardour – The Digital Audio Workstation – In the classic tradition of running before walking, I just have to try this app out.



On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

Songbird on Gentoo

October 2nd, 2009 No comments

For various reasons, Rhythmbox (the default GNOME audio player) returns this wonderful message, which I’m putting off troubleshooting for the time being:

rhythmbox: error while loading shared libraries: libplds4.so.7: cannot open shared object file: No such file or directory

I decided to install Songbird instead. Problem is, I can’t seem to install the Songbird package from the overlay manager, either by unmasking or otherwise. I’m still a bit confused on how to manually install ebuilds as well. Here’s what I ended up doing to get my music collection back up and running:

  • Downloaded default Linux package from GetSongbird.
  • Extracted package to directory of my choice. Right now it’s sitting in ~/Desktop/Songbird, but I expect to move it to a more appropriate /opt/songbird soon.
  • Removed all gstreamer libraries from the main installation as per this comment in the Gentoo bug tracker:
    rm -rf lib/libgst*
  • Added Songbird to my GNOME menu in Sound and Video category. I haven’t been able to pick an appropriate icon – any official ones or suggestions?



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.
Categories: Jake B Tags: , , , , ,

My audio doesn’t work anymore

September 21st, 2009 1 comment

Yup. Not sure why. It just happened. I have tried messing around in my audio settings and still nothing. In fact the only audio device I can get to play is not PulseAudio, or anything standard like that, but rather the Intel audio card that it found for my system. While this is all fine and promising it still doesn’t work right. When I tried to set it as my primary device and restarted my machine KDE threw a bunch of error messages my way saying that it couldn’t use the Intel device (really? because that was the only one that worked for me…) and instead fell back to PulseAudio (really? because that one doesn’t work for me…).

Why is it that Linux works great for a short while and then suddenly breaks itself?

How to add audio and video codecs to Fedora 11

September 3rd, 2009 3 comments

By default this distro does not support non-free codecs. After a quick google search I found this quick and easy solution to add audio and video codecs to my Fedora install. Thanks again Tech Jaws.

In a root terminal run these commands

rpm -Uhv http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm

and

yum install gstreamer-plugins-bad gstreamer-plugins-ugly

That should do it! Full MP3 support!

[UPDATE] I noticed that MP3 support wasn’t working in Amarok so after some googling I corrected this problem by also installing the following.

yum install libtunepimp-extras-nonfree
yum install xine-lib-extras-nonfree