Installing Chrome & Flash with audio in Centos 6

Installing Flash in Linux has never been very easy.  However, Chrome for linux has now bundled Flash player with it, which does seem to simplify the process.  However, audio was still a trick to get working correctly, so I thought I would share the steps I followed to get everything up and running successfully.

Install Google Chrome

The first step, installing Chrome, was simple.  In Cent 6, Google has a repo setup which makes installation a breeze:

Put the following into /etc/yum.repos.d/google-chrome.repo


Now install the stable version of Chrome

sudo yum install google-chrome-stable

If you want the beta version, you can swap google-chrome-stable for google-chrome-beta

Once complete, your installation of Chrome is complete, and the default installation includes Flash player. In my case, I was having issue with audio.  Even though I had audio in all other applications on my system, for some reason Flash audio wasn’t working.

Fixing broken audio

The issue here looks like its an oversight in the flash plugin.  The solution really turned out to be quite simple, but difficult to diagnose.

First, make sure audio on your system is working.  Reference my other article on getting HDMI audio working for more details that may be helpful in accomplishing this not-so-trivial task.

Next, the underlying problem here appears to be the location where Flash player looks for the alsa configuration.  So the first step is simply to create a local user-specific .asoundrc (or in my case symlink to my existing alsa configuration).

Existing alsa configuration

If you already have an existing /etc/asound.conf that is working, simply symlink to it:

ln -s /etc/asound.conf ~/.asoundrc

New alsa configuration

If you don’t have an existing asound.conf, or don’t have permission to edit the main one, create your .asoundrc:

$] aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
	Subdevices: 1/1
	Subdevice #0: subdevice #0

In this case, I have my audio and video handled by the same card via HDMI: card 0.  The “device” line may not be necessary, but notice the device as listed as 3 above.  Now edit ~/.asoundrc and add:

pcm.!default {
	type hw
	card 0
	device 3

ctl.!default {
	type hw
	card 0
	device 3

The above is explained in much more detail in a separate article on getting HDMI audio working.

Log out of the machine and back in and voila!  Flash now has sound.