Universal HDMI Sound (...Plug n' Play 4 Porteus)

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Out Of The Box Audio

Post#1 by brokenman » 14 Dec 2014, 01:46

From within Porteus please open up a root terminal and paste the following into it:

cat >> /etc/asound.conf << EOF
defaults.pcm.card 1
defaults.ctl.card 1
EOF

Close your application and reopen it and check your audio. If it doesn't work please post the output of: aplay -L
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Out Of The Box Audio

Post#2 by brokenman » 15 Dec 2014, 15:06

First try the sound card settings in 'Porteus Settings Centre'. It will attempt to change the order of your cards so the analog card is first in the list. Failing that you can find plenty of examples around the net about how to use asoundrc or something similar to change the order.

https://bbs.archlinux.org/viewtopic.php?pid=1454964
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Out Of The Box Audio

Post#3 by fanthom » 15 Dec 2014, 18:03

i guess they have an udev rules or some sound daemon running which sets internal sound card as default and switches to HDMI when external monitor is connected.

please show me 'aplay -l' command (not L) and 'cat /proc/asound/devices' as i think both devices sits on the same sound card and brokenmans config needs modification.

thanks
Please add [Solved] to your thread title if the solution was found.

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Out Of The Box Audio

Post#4 by brokenman » 16 Dec 2014, 00:06

Probably just this alone would be enough in ~/.asoundrc
defaults.pcm.!card 1

From your output

front:CARD=Generic_1,DEV=0
HD-Audio Generic, ALC282 Analog


I would say that either one of these pairs should work for you in your ~/.asoundrc file.

defaults.pcm.!card Generic_1
defaults.pcm.!device 0

defaults.pcm.!card 1
defaults.pcm.!device 0
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Out Of The Box Audio

Post#5 by fanthom » 16 Dec 2014, 09:48

original code posted by brokenman should work for this case, /etc/asound.conf should have:

Code: Select all

defaults.pcm.card 1
defaults.ctl.card 1
please create this config and reboot to see if its working.
Please add [Solved] to your thread title if the solution was found.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Out Of The Box Audio

Post#6 by fanthom » 20 Jan 2015, 09:47

sorry it should be:

Code: Select all

defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1
Please add [Solved] to your thread title if the solution was found.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Out Of The Box Audio

Post#7 by fanthom » 20 Jan 2015, 12:13

just switch the sound output in your movie player to HDMI. it will be defined as
card 0, device 3

(your normal audio card is defined as: card 1, device 0 in the system)
Please add [Solved] to your thread title if the solution was found.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Out Of The Box Audio

Post#8 by fanthom » 21 Jan 2015, 07:15

right - i thought you need a static solution (once card set by default).
if you need to change the system sound output during the session then i dont know how to do this.
Please add [Solved] to your thread title if the solution was found.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Out Of The Box Audio

Post#9 by fanthom » 22 Jan 2015, 12:53

I'm interested in a static solution.
you are not because:
I I'm just forced to boot Lxle when I need to use my television with sound.

so you need dynamic solution which will let you switch the sound output between Analog/HDMI card on the fly.
unfortunately i dont know how to do this (without rebooting the PC which is needed to reload alsa settings)
Please add [Solved] to your thread title if the solution was found.

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Out Of The Box Audio

Post#10 by brokenman » 22 Jan 2015, 23:34

The link you gave suggests that you add the boot command: radeon.audio=1

So when you boot porteus and you come to the blue boot screen, hit the TAB button and enter this command on the end. Then hit return to continue booting. If it works you can add the line to your porteus.cfg file (found in the boot folder on the installation media).

If you try this and you have no video then follow the steps in the link you provided in the blue 'note' area.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Out Of The Box Audio

Post#11 by fanthom » 23 Jan 2015, 09:57

I'm interested in the Buntu's (Lxle... PeppermintOS... etc) solution which it not dynamic but it is out the box
same thing different wording

in Porteus your sound can be redirected to one output only: either to HDMI (so you have sound on your TV) or to integrated sound card (so you have sound on your PC).

i expect that *buntu uses pulseaudio which allows changing the sound output on the fly.
this is not possible in stock Porteus (unless i'm not aware of something).

try to install pulseaudio and see if that helps (search forum/google if you are not sure how to do this).
Please add [Solved] to your thread title if the solution was found.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Static HDMI (...Out Of The Box Audio)

Post#12 by fanthom » 22 Mar 2015, 19:28

correction - seems that you can change the sound output device on the fly.

probably you could create some script (keyboard shortcut?) which would move certain ALSA config to /etc/asound.conf.
possible configurations for your PC:

Code: Select all

defaults.pcm.card 0
defaults.pcm.device 3
defaults.ctl.card 0

Code: Select all

defaults.pcm.card 0
defaults.pcm.device 7
defaults.ctl.card 0

Code: Select all

defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1

Code: Select all

defaults.pcm.card 1
defaults.pcm.device 1
defaults.ctl.card 1
example:
save first config as /etc/asound.conf and launch firefox

result:
sound output from youtube will be redirected to first HDMI port

save third config as /etc/asound.conf and launch qmmp

result:
sound output from music player will be redirected to first internal sound card

etc ...
Please add [Solved] to your thread title if the solution was found.

User avatar
Tonio
Contributor
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#13 by Tonio » 19 Apr 2015, 02:44

Dear folks,

I have a fairly new machine which a friend built for me. ATM I am using hdmi to view on a big monitor that a friend gave me, it flickered off and on, but now works very well and can't complain. Using windows 7, the machine outputs sound without problem. However, using porteus the sound does not work from hdmi.

Code: Select all

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde PRO [Radeon HD 7750 / R7 250E]
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
I do have sound when I connect speakers to the machine, but it would be nice to have sound from hdmi. I shall try the radeon.audio=1 command upon bootup and see if it helps. I want to not use Windows 7 on this machine and just use linux. I have configured a usb with most things I use and I am very happy with it. I have a tv card that I need to find firmware to get it working, but don't know much about this sadly :( I will report back if radeon.audio=1 works or not. Thanks to all for your input. @bluemeridian great job in finding solutions to many problems encountered. I appreciate your work. I have used some of your suggestions to get some things that did not work before.

User avatar
Tonio
Contributor
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#14 by Tonio » 02 May 2015, 02:43

Tried the boot parameter. It did not work :( I still have regular speakers. They work fine. Thanks to all for your help. I do not know if I should install an OS on this machine or just run live on usb or from LiveDVD? I do not run want to run windows on this machine, only if I have to.

User avatar
brokenman
Site Admin
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#15 by brokenman » 02 May 2015, 23:10

I'm attempting to tackle this common problem today.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply