You are not logged in.

#1 2014-07-03 10:26:44

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

KMix shows 2 masterbars or How to "properly" setup an ALSA HDMI master

I use sound output over HDMI with speakers connected to my monitor. As the HDMI out on the MSI b85i does not provide any hardware volume control (does it ever?) I needed to add a software volume control to alsa. My alsa is configured as below.

$ cat /etc/asound.conf
pcm.!default {
  type plug
  slave.pcm "softvol"
  hint {
    show on
    description "HDMI Softvol"
  }
}

pcm.softvol {
  type softvol
  slave.pcm "dmixer"
  control {
    name "Softmaster"
    card HDMI
  }
}

pcm.dmixer  {
  type dmix
  ipc_key 1024
  ipc_key_add_uid 0
  ipc_perm 0666
  slave.pcm {
    type hw
    card HDMI
    device 7
  }
  bindings {
    0 0
    1 1
  }
}

Aditionally I use KDE, controlling the sound over KMix. I set the Default channel to the softvolume. Now I have the problem that KMix shows two bars. One controlling master volume and one doing nothing but taking me the ability to change the volume by hovering over the icon and scroll with the mouse wheel. Has anybody ever faced this situation and maybe a solution?

Last edited by manuelschneid3r (2014-07-03 12:37:27)


Please feel free to correct my english.

Offline

#2 2014-07-03 12:35:12

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

Re: KMix shows 2 masterbars or How to "properly" setup an ALSA HDMI master

Haha I cant believe it. I tried count 1 in the softvol plugin config, which is not a solution. The problem is that the softvolume control is recognized as contol for capture and playback. I found a nice hint in the alsa mailing list, which is not mentioned anywhere in 5-row-documentation hmm :

To prevent the mixer from showing it as a capture control, name
it "Master Playback Volume" instead.
[...]
It is the "Playback Volumne" suffix that has a special meaning.

Another problem was that I cant tell alsa to forget about past configs in a proper way. This is ridiculous, and ended up in powering off my pc manually so that alsa could not store the current state.

Well an abreviation of what I did to get it to work

  • Adjust asound.conf regarding the hint above

  • hard-reset PC (not recommended first try this, but did not work for me.

  • Be happy about a working master on HDMI.

  • Apply default channel in KMIx.

The asound.conf still looks pretty much the same

pcm.!default {
  type plug
  slave.pcm "softvol"
  hint {
    show on
    description "HDMI Softvol"
  }
}

pcm.softvol {
  type softvol
  slave.pcm "dmixer"
  control {
    name "Master Playback Volume"
    card HDMI
    device 7
  }
}

pcm.dmixer  {
  type dmix
  ipc_key 1024
  ipc_key_add_uid 0
  ipc_perm 0666
  slave.pcm {
    type hw
    card HDMI
    device 7
  }
  bindings {
    0 0
    1 1
  }
}

ctl.!default {
  type hw
  card HDMI
}
ctl.softvol {
  type hw
  card HDMI
}
ctl.dmixer {
  type hw
  card HDMI
} 

Regards

EDIT:
For the spitefulness': After working hours for this I recognized, that my monitor stops the Audio out if it goes to sleep. This was a criterion, damn. big_smile

Last edited by manuelschneid3r (2014-07-04 10:50:21)


Please feel free to correct my english.

Offline

Board footer

Powered by FluxBB