You are not logged in.

#1 2012-06-18 09:39:37

HarD
Member
From: Russia
Registered: 2011-08-11
Posts: 30

kmix and hdmi

I decided to try a few days ago here on the hdmi pass audio to the LCD TV.
So the problem is that kmix refuses to adjust the volume on the hdmi (selected channel master).
Tried in alsamixer - all sliders - does not help.
Tried phonon-vlc and phonon-mplayer.

Temporarily solved the problem by using pulseaudio ... but this is not a solution of problem )

Perhaps there is someone help and haved ideas of possible problems? ..

aplay-l

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice # 0: subdevice # 0
card 0: Intel [HDA Intel], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice # 0: subdevice # 0
card 0: Intel [HDA Intel], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice # 0: subdevice # 0

ls-l / dev/snd

 
drwxr-xr-x 2 root root 60 June 17 22:23 by-path
crw-rw ---- + 1 root audio 116, 9 June 17 22:23 controlC0
crw-rw ---- + 1 root audio 116, 8 June 17 22:23 hwC0D2
crw-rw ---- + 1 root audio 116, 7 June 17 22:23 hwC0D3
crw-rw ---- + 1 root audio 116, 6 June 17 22:24 pcmC0D0c
crw-rw ---- + 1 root audio 116, 5 June 17 22:24 pcmC0D0p
crw-rw ---- + 1 root audio 116, 4 June 17 22:23 pcmC0D1p
crw-rw ---- + 1 root audio 116, 3 June 17 22:23 pcmC0D2c
crw-rw ---- + 1 root audio 116, 2 June 18 12:16 pcmC0D3p
crw-rw ---- 1 root audio 116, 1 June 17 22:23 seq
crw-rw ---- + 1 root audio 116, 33 June 17 22:23 timer

lsmod | grep snd

snd_hda_codec_hdmi 23,672 a
snd_hda_codec_realtek 60,313 a
snd_hda_intel 24053 2
snd_hda_codec 94 273 3 snd_hda_codec_realtek, snd_hda_codec_hdmi, snd_hda_intel
snd_hwdep 6300 1 snd_hda_codec
snd_pcm 74958 3 snd_hda_codec_hdmi, snd_hda_codec, snd_hda_intel
snd_page_alloc 7217 2 snd_pcm, snd_hda_intel
snd_timer 18966 1 snd_pcm
snd 58997 11 snd_hda_codec_realtek, snd_hwdep, snd_timer, snd_hda_codec_hdmi, snd_pcm, snd_hda_codec, snd_hda_intel
soundcore 5410 1 snd 

Last edited by HarD (2012-06-18 09:52:39)

Offline

#2 2012-07-05 08:44:09

HarD
Member
From: Russia
Registered: 2011-08-11
Posts: 30

Re: kmix and hdmi

In the continuation of the theme:
Here the other day I wanted to connect the webcam even headphones (on the front panel PC)
In KDE, I use phonon-mplayer.

But never really found an explanation as mute hdmi and get to go on headphones sound only in the front of the PC automatically when they connect.
Manual mute is not very convenient, but works.
There is speculation that the event-based scripting for even like find which event is responsible for this:

sudo hexdump -C /dev/input/event15

Without the use of (what I write is lower and no hdmi and .asoundrc) only if you use analog, everything is fine muted - speakers to headphones, but I threw the column and decided to get working hdmi sound on TV.

So far turned out to make a simultaneous sound output on the hdmi stereo and headphones (and speakers seemed too smile) independent adjustment of stereo headphones and hdmi hdmi ability to manually mute or headphone volume adjustment in applications that use phonon.

Configure mplayer - for the phonon applications.

$ cat .mplayer/config 
# Write your default config options here!
heartbeat-cmd="qdbus org.freedesktop.ScreenSaver  /ScreenSaver SimulateUserActivity"
softvol=yes

Config alsa to use dmix, multi, softvol and the creation of a separate regulator for the hdmi.

$ cat .asoundrc
pcm.analog-hw {
type plug
  slave.pcm "dmix:0,0"
}

ctl.analog-hw {
  type hw
  card 0
}

pcm.digital-hw {
type plug
  slave.pcm "dmix:0,3"
}

pcm.hdmi_complete {
  type softvol
  slave.pcm digital-hw
  control.name Hdmi
  control.card 0
}

pcm.dmix-analog {
  type dmix
  ipc_key 1234
  slave {
    pcm "analog-hw"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 48000
  }
}

ctl.dmix-analog {
  type hw
  card 0
}

pcm.dmix-digital {
  type dmix
  ipc_key 1235
  slave {
    pcm "hdmi_complete"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 48000
  }
}

ctl.dmix-digital {
  type hw
  card 0
}

pcm.!default {
  type plug
  slave {
    pcm multi
    rate 48000
  }
  ttable.0.0 1.0
  ttable.1.1 1.0
  ttable.0.2 1.0
  ttable.1.3 1.0
}

ctl.!default {
  type hw
  card 0
}

pcm.multi {
  type multi
  slaves.a.pcm "analog-hw"
  slaves.a.channels 2
  slaves.b.pcm "hdmi_complete"
  slaves.b.channels 2
  bindings.0.slave a
  bindings.0.channel 0
  bindings.1.slave a
  bindings.1.channel 1
  bindings.2.slave b
  bindings.2.channel 0
  bindings.3.slave b
  bindings.3.channel 1
}

ctl.multi {
  type hw
  card 0

So that card is not skipped after reboot (usb from the web camera).

$ cat /etc/modprobe.d/sound.conf
options snd_hda_intel index=0
options snd_usb_audio index=1

Removed in Kmix - to restore the volume when you log into the system.

But in general I think that's worth so suffering, to give up pulseaudio ...
With him, in principle, by default, all works fine ... smile

Someone that you can tell, or encountered such a problem?
How i can muted HDMI automatically?

Offline

Board footer

Powered by FluxBB