Don't worry brokenman. It is not big problem. I am looking at installing Slackware on this machine, but am not sure when, openjdk is not working on slackware current at this time, some libgif* not working so iced-tea-web is not working and opening *.jnlp files. I'll have to tackle this first. But let me know if I can do something to help.brokenman wrote:I'm attempting to tackle this common problem today.
Universal HDMI Sound (...Plug n' Play 4 Porteus)
- Tonio
- Contributor
- Posts: 276
- Joined: 28 Dec 2010, 16:37
- Distribution: Slackware,porteus,FreeBSD,Slax
- Location: 127.0.0.1
Re: Static HDMI (...Out Of The Box Audio)
Post#16 by Tonio » 03 May 2015, 21:21
Tonio
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Static HDMI (...Out Of The Box Audio)
Post#17 by brokenman » 03 May 2015, 23:19
I now have some udev rules that automatically send video to HDMI when it is plugged. I also have a script that will ask which card you want to use and give you a test. Works fine for me on three machines tested.
Wear your underpants on the outside and put on a cape.
brokenman
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Static HDMI (...Out Of The Box Audio)
Post#18 by brokenman » 04 May 2015, 15:54
For people that boot into fresh mode and want to select a sound card and keep it persistent, just copy the resulting alsa config file into the rootcopy folder and you're done.
Wear your underpants on the outside and put on a cape.
brokenman
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Solved?:Static HDMI (...Out Of The Box Audio)
Post#19 by brokenman » 05 May 2015, 14:58
Wear your underpants on the outside and put on a cape.
brokenman
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Solved?:Static HDMI (...Out Of The Box Audio)
Post#20 by brokenman » 07 May 2015, 01:08
And using aplay -l to find the HDMI sound device using the output of the above command (E.g HDMI1).xrandr | awk '/ connected/{print$1}'
Then a file is created at /etc/asound.conf telling alsa which sound device to use. The problem I encountered was writing the asound.conf file from a udev script. Shouldn't be too hard to figure out once i get some more time. Remember I am creating a universal solution that will work on the majority of machines. If this solution is required just for YOUR machine it is much simpler. Just create two asound config files. One for the analog output and one for the HDMI output. When udev detects a HDMI plugin it creates a symlink at /etc/asound.conf pointing to the correct HDMI config file. If you need help with this just post the output of:
Code: Select all
xrandr && aplay -l
Wear your underpants on the outside and put on a cape.
brokenman
- Tonio
- Contributor
- Posts: 276
- Joined: 28 Dec 2010, 16:37
- Distribution: Slackware,porteus,FreeBSD,Slax
- Location: 127.0.0.1
Re: Universal HDMI Sound (...Plug n' Play 4 Porteus)
Post#21 by Tonio » 09 May 2015, 00:47
Would you mind posting the script? I ran your commands sugested I get
Code: Select all
guest@porteus:~$ xrandr && aplay -l
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 16384 x 16384
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 593mm x 371mm
1920x1200 60.0*+
1920x1080 60.0 59.9
1920x1080i 60.1 60.0
1680x1050 59.9
1400x1050 59.9
1280x1024 75.0 60.0
1440x900 59.9
1280x960 60.0
1152x864 75.0
1280x720 60.0 59.9
1024x768 75.1 70.1 60.0
1440x480 60.0 59.9
1440x480i 60.1 60.1
832x624 74.6
800x600 72.2 75.0 60.3 56.2
720x480 60.0 59.9
640x480 75.0 72.8 66.7 60.0 59.9
720x400 70.1
DVI-0 disconnected (normal left inverted right x axis y axis)
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC887-VD Analog [ALC887-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC887-VD Digital [ALC887-VD Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
guest@porteus:~$ xrandr | awk '/ connected/{print$1}'
HDMI-0
guest@porteus:~$
Code: Select all
.... /* removed to save space ********/ ........
state.HDMI {
control {
}
}
state.CX23885 {
control {
}
}
guest@porteus:~$ cat /etc/asound.conf
cat: /etc/asound.conf: No such file or directory
guest@porteus:~$
Tonio
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Universal HDMI Sound (...Plug n' Play 4 Porteus)
Post#22 by brokenman » 11 May 2015, 15:57
If so move it elsewhere and run aplay -l again. The output should be something like:
Code: Select all
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: 92HD99BXX Analog [92HD99BXX Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
Wear your underpants on the outside and put on a cape.
brokenman
- Tonio
- Contributor
- Posts: 276
- Joined: 28 Dec 2010, 16:37
- Distribution: Slackware,porteus,FreeBSD,Slax
- Location: 127.0.0.1
Re: Universal HDMI Sound (...Plug n' Play 4 Porteus)
Post#23 by Tonio » 12 May 2015, 23:09

Code: Select all
guest@porteus:~$ cat $HOME/.asound.conf
cat: /home/guest/.asound.conf: No such file or directory
guest@porteus:~$ ls .as*
/bin/ls: cannot access .as*: No such file or directory
guest@porteus:~$ pwd
/home/guest
guest@porteus:~$ find -iname "*.conf" > .allconffiles
guest@porteus:~$ cat .allconffiles
guest@porteus:~$ su -c 'find -iname "*.conf" > /home/guest/.allconffiles'
Password:
find: `./.gvfs': Permission denied
guest@porteus:~$ cat .allconffiles
guest@porteus:~$ su -c 'find -iname "*.conf" > /home/guest/.allconffiles'
Password:
find: `./.gvfs': Permission denied
guest@porteus:~$
root@porteus:/etc# ls *.conf
ca-certificates.conf gpm-syn.conf mtools.conf smartd.conf
changes-exit.conf gpm-twiddler.conf nfsmount.conf syslog.conf
dhcpcd.conf host.conf nscd.conf updatedb.conf
dnsmasq.conf ld.so.conf nsswitch.conf usb_modeswitch.conf
esd.conf logrotate.conf resolv.conf wpa_supplicant.conf
ffserver.conf mdadm.conf sensors3.conf
gpm-root.conf mke2fs.conf serial.conf
root@porteus:/etc# cd /root/
root@porteus:~# ls
Desktop/ Documents/ Downloads/ Music/ Pictures/ Video/
root@porteus:~# cat $HOME/.asound.conf
cat: /root/.asound.conf: No such file or directory
root@porteus:~# echo $HOME
/root
root@porteus:~# exit
logout
guest@porteus:~$ echo $HOME
/home/guest
guest@porteus:~$ ls .allconffiles
.allconffiles
guest@porteus:~$ cat .allconffiles
http://www.maketecheasier.com/setup-hd ... in-linux/
I have done suggested command, and get
Code: Select all
guest@porteus:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=SB
HDA ATI SB, ALC887-VD Analog
Default Audio Device
sysdefault:CARD=SB
HDA ATI SB, ALC887-VD Analog
Default Audio Device
front:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
Front speakers
surround21:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Digital
IEC958 (S/PDIF) Digital Audio Output
guest@porteus:~$
Code: Select all
guest@porteus:~$ aplay -L
ALSA lib conf.c:1697:(snd_config_load1) _toplevel_:7:17:Unexpected char
ALSA lib conf.c:3417:(config_file_open) /home/guest/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3339:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3788:(snd_config_update_r) hooks failed, removing configuration
guest@porteus:~$ rm .asoundrc

Code: Select all
root@porteus:~# lspci -vv | grep 'HDMI'
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
Code: Select all
state.HDMI {
control {
}
}
state.CX23885 {
control {
}
}
root@porteus:~#
root@porteus:~# lspci -v | grep -i audio
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) (rev 40)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
05:00.0 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 0f)
root@porteus:~#
Tonio
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Universal HDMI Sound (...Plug n' Play 4 Porteus)
Post#24 by brokenman » 14 May 2015, 01:23
Wear your underpants on the outside and put on a cape.
brokenman
- Tonio
- Contributor
- Posts: 276
- Joined: 28 Dec 2010, 16:37
- Distribution: Slackware,porteus,FreeBSD,Slax
- Location: 127.0.0.1
Re: Universal HDMI Sound (...Plug n' Play 4 Porteus)
Post#25 by Tonio » 14 May 2015, 02:07
Code: Select all
guest@porteus:~/Downloads$ su -c 'lspci -v | grep -i audio'
Password:
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) (rev 40)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
05:00.0 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 0f)
guest@porteus:~/Downloads$ su -c 'lspci -vv | grep 'HDMI' '
Password:
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
guest@porteus:~/Downloads$


Do not worry about it, but if you insist on fixing this, or finding a workaround, don't hesitate to post suggestions and I'll try them. Most of the solutions online are for *buntu and/or *buntu based distros which have pulseaudio installed. We don't want to work with that beast here, nor worry about a similar systemd stuff that may find its way


Tonio
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Universal HDMI Sound (...Plug n' Play 4 Porteus)
Post#26 by brokenman » 26 Sep 2015, 02:32
If you are talking about getting sound over HDMI then this is what I can offer. Your /etc/asound.conf file should look like this for analog:
defaults.pcm.card 0
defaults.pcm.device 1
defaults.ctl.card 0
and this for HDMI
defaults.pcm.card 1
defaults.pcm.device 3
defaults.ctl.card 1
If the HDMI doesn't work then try replacing number 3 with 7
If this doesn't work I am out of ideas. Probably a driver for nVidia you need and don't have. Please try this in always fresh mode.
Wear your underpants on the outside and put on a cape.
brokenman
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Universal HDMI Sound (...Plug n' Play 4 Porteus)
Post#27 by brokenman » 26 Sep 2015, 22:16
Here is the main script for providing HDMI audio (once you have plugged in):
---------------------------
#!/bin/bash
hdmin=$1
## Backup existing asound.conf
asnd="/etc/asound.conf"
[ -f $asnd ] && mv $asnd ${asnd}.bak
## Get HDMI sound card/device number
cardnum=`aplay -l | awk '/HDMI '$hdmin'/{print$2}' | sed 's/://'`
devnum=`aplay -l | awk '/HDMI '$hdmin'/{print$8}' | sed 's/://'`
## Generate asound.conf
echo "defaults.pcm.card $cardnum" > $asnd
echo "defaults.pcm.device $devnum" >> $asnd
echo "defaults.ctl.card $cardnum" >> $asnd
---------------------------
Then you can test your speakers:
speaker-test -t sin -l 1
WARNING: This sound is irritating so be ready to ctrl + c to exit.
Wear your underpants on the outside and put on a cape.
brokenman
Re: Universal HDMI Sound (...Plug n' Play 4 Porteus)
Post#28 by fullmoonremix » 02 Dec 2015, 00:16

Would this script work with OSS?
I'm not really familiar with "udev" but exactly how would I configure these rules for OSS.I now have some udev rules that automatically send video to HDMI when it is plugged.
I'm not the brightest bulb in the pack... however I'm a quick study if things are broken down for me.
Best Regards...

fullmoonremix