HDMI and Pulseaudio

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
codingman
Posts: 5
Joined: 2014-05-30 18:10

HDMI and Pulseaudio

#1 Post by codingman »

Hello, this is my first post on these forums. I'm deeply sorry if I have not abided by any rules or have posted this in the wrong area.

I currently have a laptop with an Intel HDMI port, and have connected it to an AVR that has 7.1 channel capabilities (though currently set to 5.1). Earlier this week, it would work properly even with:

Code: Select all

# pasuspender -- speaker-test -D hdmi -c 8 FL,FC,FR,RR,RRC,RLC,RL,LFE
Producing pink noise throughout the room. Now, however it does not work. I've tried changing the output in the Gnome System Settings, but that did not help. I tried:

Code: Select all

# alsactl init
Which gives:

Code: Select all

Found hardware: "HDA-Intel" "Intel IbexPeak HDMI" "HDA:10ec0269,11790622,00100100 HDA:80862804,11790001,00100000" "0x1179" "0x0001"
Hardware is initialized using a generic method
I have also tried unmuting everything in alsamixer, as well as messing around in pavucontrol, but to still no avail.

Code: Select all

# cat /proc/asound/modules
Gives me:

Code: Select all

 0 snd_hda_intel

Code: Select all

# pactl stat
Gives me:

Code: Select all

Currently in use: 4 blocks containing 277.7 KiB bytes total.
Allocated during whole lifetime: 273887 blocks containing 1.5 GiB bytes total.
Sample cache size: 149.8 KiB
Server String: unix:/tmp/pulse-8NSJeYBrQrLA/native
Library Protocol Version: 26
Server Protocol Version: 26
Is Local: yes
Client Index: 728
Tile Size: 65472
User Name: codingman
Host Name: *****
Server Name: pulseaudio
Server Version: 2.0
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1b.0.hdmi-surround-extra1
Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo
Cookie: c4b0:c4ff
Notice the line of the "Default Sink".

Code: Select all

# lsmod | grep snd
Returns:

Code: Select all

snd_hda_codec_hdmi     30824  1
snd_hda_codec_realtek   188851  1
snd_hda_intel          26259  2
snd_hda_codec          78031  3 snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec_hdmi
snd_hwdep              13186  1 snd_hda_codec
snd_pcm                68083  3 snd_hda_codec,snd_hda_intel,snd_hda_codec_hdmi
snd_page_alloc         13003  2 snd_pcm,snd_hda_intel
snd_seq                45126  0
snd_seq_device         13176  1 snd_seq
snd_timer              22917  2 snd_seq,snd_pcm
snd                    52889  13 snd_timer,snd_seq_device,snd_seq,snd_pcm,snd_hwdep,snd_hda_codec,snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec_hdmi
soundcore              13065  1 snd

Code: Select all

# pactl list sinks
Gives:

Code: Select all

Sink #6
    State: SUSPENDED
    Name: alsa_output.pci-0000_00_1b.0.hdmi-surround-extra1
    Description: Built-in Audio Digital Surround 5.1 (HDMI)
    Driver: module-alsa-card.c
    Sample Specification: s16le 6ch 44100Hz
    Channel Map: front-left,front-right,rear-left,rear-right,front-center,lfe
    Owner Module: 4
    Mute: no
    Volume: 0: 100% 1: 100% 2: 100% 3: 100% 4: 100% 5: 100%
            0: -0.08 dB 1: -0.08 dB 2: -0.08 dB 3: -0.08 dB 4: -0.08 dB 5: -0.08 dB
            balance 0.00
    Base Volume: 100%
                 0.00 dB
    Monitor Source: alsa_output.pci-0000_00_1b.0.hdmi-surround-extra1.monitor
    Latency: 0 usec, configured 0 usec
    Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "HDMI 1"
        alsa.id = "HDMI 1"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "7"
        alsa.card = "0"
        alsa.card_name = "HDA Intel"
        alsa.long_card_name = "HDA Intel at 0xd4620000 irq 43"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.name = "5 Series/3400 Series Chipset High Definition Audio"
        device.form_factor = "internal"
        device.string = "hdmi:0,1"
        device.buffering.buffer_size = "65520"
        device.buffering.fragment_size = "32760"
        device.access_mode = "mmap+timer"
        device.profile.name = "hdmi-surround-extra1"
        device.profile.description = "Digital Surround 5.1 (HDMI)"
        device.description = "Built-in Audio Digital Surround 5.1 (HDMI)"
        alsa.mixer_name = "Intel IbexPeak HDMI"
        alsa.components = "HDA:10ec0269,11790622,00100100 HDA:80862804,11790001,00100000"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Ports:
        hdmi-output-1: HDMI / DisplayPort 2 (priority: 5800)
    Active Port: hdmi-output-1
    Formats:
        dts-iec61937, format.rate = "[ 32000, 44100, 48000, 88200, 96000, 176400, 192000 ]"
        pcm
Any suggestions are welcome! :D

codingman
Posts: 5
Joined: 2014-05-30 18:10

Re: HDMI and Pulseaudio

#2 Post by codingman »

Wow, I figured someone would have replied by now, but noooo....

devils_debian
Posts: 43
Joined: 2011-10-15 17:30

Re: HDMI and Pulseaudio [OMISSIONS UPDATE]

#3 Post by devils_debian »

My suggestion is of the typically loathesome type, i.e. I cannot fix your problem but suggest a alternative (disruptive) solution instead.
That suggestion is to ditch Pulseaudio and switch to JACK. I've been Pulseaudio daemon free (not lib free, due to desktop dependencies) for a long time now.
Key things to do are:
1) Disable or remove the Pulseaudio executable (apt-get remove pulseaudio)
2) Create a new /etc/asound.conf for exclusive routing of all sound via JACK
3) Use Qjackctl for sound server configuration (e.g. set input/output sinks - that is HDMI,analogue,SPDIF etc)
[Omission Added]
Add additionally required loopback file for jackd to use (python executable). I chose to put mine in /usr/local/bin
Note: jack-aloop must be set executable (chmod +x <file>) I have the file here: https://db.tt/pPzL1LbL (Use right click 'Save as').
The 'jack-aloop service must be started after qjackctl (and subsequently jackd) have started. Either manage this with a script or
in Qjackctl settings you must:
Add to the post startup field: sleep 2| exec /usr/local/bin/jack-aloop &
[OmissionEnd]

Create/edit /etc/asound.conf

# ------------------------------------------------------
# Custom asoundrc file for use with snd-aloop and JACK

# ------------------------------------------------------
# playback device
pcm.aloopPlayback {
type dmix
ipc_key 1
ipc_key_add_uid true
slave {
pcm "hw:Loopback,0,0"
format S32_LE
rate {
@func igetenv
vars [ JACK_SAMPLE_RATE ]
default 48000
}
period_size {
@func igetenv
vars [ JACK_PERIOD_SIZE ]
default 1024
}
buffer_size 4096
}
}

# capture device
pcm.aloopCapture {
type dsnoop
ipc_key 2
ipc_key_add_uid true
slave {
pcm "hw:Loopback,0,1"
format S32_LE
rate {
@func igetenv
vars [ JACK_SAMPLE_RATE ]
default 48000
}
period_size {
@func igetenv
vars [ JACK_PERIOD_SIZE ]
default 1024
}
buffer_size 4096
}
}

# duplex device
pcm.aloopDuplex {
type asym
playback.pcm "aloopPlayback"
capture.pcm "aloopCapture"
}

# ------------------------------------------------------
# default device

pcm.!default {
type plug
slave.pcm "aloopDuplex"
}

# ------------------------------------------------------
# alsa_in -j alsa_in -dcloop -q 1
pcm.cloop {
type dsnoop
ipc_key 3
ipc_key_add_uid true
slave {
pcm "hw:Loopback,1,0"
format S32_LE
rate {
@func igetenv
vars [ JACK_SAMPLE_RATE ]
default 48000
}
period_size {
@func igetenv
vars [ JACK_PERIOD_SIZE ]
default 1024
}
buffer_size 4096
}
}

# ------------------------------------------------------
# alsa_out -j alsa_out -dploop -q 1
pcm.ploop {
type plug
slave {
pcm "hw:Loopback,1,1"
}
}

###### end #######


Install the following items:
apt-get install qjackctl zita-ajbridge zita-alsa-pcmi-utils rtkit
(JACK and other related items will be pulled automatically)


For convenience, configure Qjackctl to start minimised in the system tray.
This will make it easier to switch between say, laptop speakers (analogue out) and HDMI.
Tick the 'Enable Realtime' option.
Enable/add Qjackctl to your autostart (desktop login). Tip: If JACK fails to start it maybe
due to the following reasons:

1) Qjackctl is trying to start up too quickly, due to slow HDD speeds and therefore, a slow desktop.
Either add a 'sleep 5' delay in your autostart script or increase the delay time option in Qjackctl
for starting the JACK daemon (jackd). Try this option first (easier).

2) You are suffering a lack of realtime pemission authority.
IIRC, upon installation, Debian will ask if you wish JACK to have realtime enabled. Answer 'yes'. Also, ensure that
your user is in the 'audio' group (normally is but check anyway if required). Open a terminal and type 'groups' <enter>
This will show the groups your user belongs to.

Alternatively, download KXStudio live desktop iso and burn to your media of choice. This should help evaluate your
hardware issues before (if) attempting the above.
http://kxstudio.sourceforge.net/Downloads#LiveDVD

It is also possible to add KXStudio repositories to a existing Debian installation if desired. You could then use Cadence tools
instead of Qjackctl but must remove the /etc/asound.conf as Cadence tool will handle this requirement.


Good Luck! (A happy JACK user).

Post Reply