On 2015-12-11 12:27, Philip Rhoades wrote:

On 2015-10-08 18:16, Clemens Ladisch wrote:
Paolo Bolzoni wrote:
"Dmix is enabled by default for soundcards which don't support
hardware mixing."

In my experience, this is a lie.

It is enabled in the ALSA device named "default".  That doesn't help
with programs that hardcode a device name like "hw:0".

You could try something like the following to find any programs that
still try to use "hw":

pcm.my_hw {
  @args [ CARD DEV ]
  @args.CARD {
    type string
    default 1
  @args.DEV {
    type integer
    default 0
  type hw
  card $CARD
  device $DEV
  subdevice -1

pcm.dmixer {
  slave.pcm "my_hw:1"

pcm.!hw = blow_up

(You could also redefine "hw" to another valid device, but it would be
a better idea to adjust the configuration of the respective program to
use the correct device.)

This version has been rock-solid for a couple of months now:

pcm.!default {
  type plug
  slave.pcm "asymed"

# This is the audio output:
pcm.dmixer {
  type dmix
  ipc_key 1024
  slave {
    pcm "hw:1,0"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 44100
  bindings {
    0 0
    1 1

ctl.dmixer {
  type hw
  card 0

# This is the microphone
pcm.dsnooped {
  ipc_key 1027
  type dsnoop
  slave.pcm "hw:1,0"

# This makes both channels work together.
pcm.asymed {
  type asym
  playback.pcm "dmixer"
  capture.pcm "dsnooped"

I am very happy now!  Thanks for all your help!

An update after continuing to be happy for nearly two years - thank you people! I am hoping this latest question will involve only another straightforward tweak - the only thing that has changed is that I am now up to Fedora 25 x86_64:

I now want to use "recordmydesktop" which is working fine with the mic but not recording sound from videos that are playing eg from YouTube or local mpv etc - hopefully an alsa guru will have a solution for me?


Philip Rhoades

PO Box 896
Cowra  NSW  2794

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
Alsa-user mailing list

Reply via email to