3

On my laptop, I've got an .asoundrc file that outputs sound to my USB headset. This works fine for SMplayer and Firefox. However, Google Chrome (at least, Flash-based and HTML5-based videos and HTML5-based audio in Chrome) plays through the laptop speakers instead. I've tried running Chrome from a command-line, hoping there would be some helpful output, but no such luck. I've tried looking through Google for whether Chrome even uses ALSA, or if it uses something else, but I have been unsuccessful in this.

This question seems to be the same issue, but no suggestion was made.

Anyone have any ideas? I'm running Gentoo with a 3.10.17 kernel, 1.0.27 ALSA utils, 2.6.5 FVWM, and 36.0.1985.143 Chrome. If you need more info, please let me know.

EDIT:

I've configured the USB headset as the default ALSA device. Volume levels for both headset and onboard are set and un-muted using alsamixer. My .asoundrc file is as follows.

ctl.!default {
  type hw
  card Headset
}

pcm.dmixer {
  type dmix
  ipc_key 1024
  slave {
    pcm {
      type hw
      card Headset
    }
    period_size 1024
    buffer_size 4096
  }
  bindings {
    0 0
    1 1
  }
}

pcm.!default {
  type plug
  slave.pcm dmixer
}

EDIT 2: More info

Ran both mplayer and google-chrome-stable from command-line. Once mplayer was playing a video (and audio), I started Chrome, went to YouTube, and played a video. The audio came out the speakers. Command-line output was as follows:

[27649:27688:0820/162104:ERROR:gservices_settings.cc(103)] Setting not found: checkin_interval
[27649:27748:0820/162105:ERROR:get_updates_processor.cc(240)] PostClientToServerMessage() failed during GetUpdates
[27649:27688:0820/162211:ERROR:raw_channel_posix.cc(139)] recvmsg: Connection reset by peer
[27649:27688:0820/162211:ERROR:channel.cc(297)] RawChannel fatal error (type 1)
[27649:27688:0820/162212:ERROR:raw_channel_posix.cc(139)] recvmsg: Connection reset by peer
[27649:27688:0820/162212:ERROR:channel.cc(297)] RawChannel fatal error (type 1)
[WARNING:flash/platform/pepper/pep_module.cpp(63)] SANDBOXED
[27649:27688:0820/162235:ERROR:raw_channel_posix.cc(139)] recvmsg: Connection reset by peer
[27649:27688:0820/162235:ERROR:channel.cc(297)] RawChannel fatal error (type 1)
  • Might want to include your .asoundrc file in the question. – 0xDAFACADE Aug 19 '14 at 20:04
  • Your USB headset is your second audio device and is not set as a default one I guess? So Chrome is using first (on-board) device. Yes, can you please include config file? :) You might also want to play audio to both devices and manage volume/mute in a mixer 6by9.net/output-to-multiple-audio-devices-with-alsa – rsm Aug 19 '14 at 20:18
  • Thanks for the responses. Question updated as requested. – DarkMoon Aug 19 '14 at 20:57
  • Have you tried playing audio in chrome while another application is playing audio as well? Or opening alsamixer and hitting "F6" to select the soundcard while Chrome is playing? Might give you a bit of useful feedback. And just for your sanity, yes, Chrome works with ALSA (most things work with ALSA...outside of particularly old OSS-only applications, for which there are workarounds usually, and a few new ones that insist on pulseaudio on top of ALSA). – 0xDAFACADE Aug 19 '14 at 22:27
  • Updated question with output from test. – DarkMoon Aug 20 '14 at 6:38
1

I just updated my kernel from 3.10.17 to 3.14.14, and the problem has gone away. Sound in Chrome is through my USB headset again. Thanks to all for your help.

0

I had different problem. Before I used pulseaudio an when I removed it I got nosound problem with crhome/chromium/firefox and even mplayer (without -ao alsa:device=hw=8.0 configuration). Once you have setup your alsamixer to use correct card by default try to export XDG_RUNTIME_DIR= && /usr/bin/chromium --alsa-output-device=default If it works you may also take look inside $XDG_RUNTIME_DIR you will probably see pulse folder, which causes the problem I guess.

NOTE: setting default alsa sound card may also be tricky when you have pulse installed. First remove pulseaudio and ~/.pulse* folder. I my case /etc/asound.conf affect root but not me before i removed pulse.

PS: I understand "export XDG_RUNTIME_DIR=" solution is not perfect and indicates that I have something left from pulse in my config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.