Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Dec 2014, 03:29
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to do audio via HDMI
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
tone

Joined: 25 Jul 2010
Posts: 15

PostPosted: Sat 24 May 2014, 05:55    Post subject:  How to do audio via HDMI  

This topic starts from the situation created in http://murga-linux.com/puppy/viewtopic.php?t=93949 where I installed AMD Drivers (fglrx).
I used Precise Puppy 5.7.1 (kernel 3.9.11) on Motherboard "ASUS_E35M1-M PRO" with "AMD Radeon HD 6310": it's connected via HDMI to a TV LED.

I can see the situation of devices running in the shell the following command
Code:

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: SB [HDA ATI SB], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: SB [HDA ATI SB], device 3: ALC887-VD Digital [ALC887-VD Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

HDMI is the default's device

//
In alsamixer "S/PDIF" is: "MM"
Turn it on with the key "M" (now is "00")

With the following commands you hear the sound
Code:

mplayer -ao alsa:device=hw=0.3 /usr/share/audio/ivy.mp3
aplay -D plughw:0,3 /usr/share/audio/beep_high.wav


With the following commands you don't hear the sound
Code:

mplayer /usr/share/audio/ivy.mp3
aplay /usr/share/audio/beep_high.wav

You can't hear the sound in the browser.

//
Now I must hear the audio also in the browser and adjust the volume with alsamixer.
If you are interested in the various steps, see section "STEP BY STEP PROCEDURE"
If you are not interested in the various steps, see section "QUICK PROCEDURE"

------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
STEP BY STEP PROCEDURE

Create the file /etc/asound.conf with the following content:
Code:

pcm.!default {
type hw
card 0
device 3
}

To enter the value of "card" and "device" I saw the output of the command "aplay -l" above

With the following command you hear the sound (don't need reboot)
Code:

mplayer /usr/share/audio/ivy.mp3


With the following command you don't hear the sound
Code:

aplay /usr/share/audio/beep_high.wav


I can listen to the audio in the browser

//
For the next modifications I was inspired from the following sites:
Softvol
http://alsa.opensrc.org/Softvol
Speaker-test
http://alsa.opensrc.org/Speaker-test
How to use softvol to control the master volume
http://alsa.opensrc.org/How_to_use_softvol_to_control_the_master_volume

Now in alsamixer there's only the "S/PDIF" voice

//
To verify that I'm using the right device:
Code:

speaker-test -Dhdmi:Generic -c2

you hear a rustle in the left, then in the right

to determine "-D"
Code:

aplay -L
hdmi:CARD=Generic,DEV=0
    HD-Audio Generic, HDMI 0
    HDMI Audio Output

(I showed just what concerns HDMI)

//
add to /etc/asound.conf
Code:

pcm.softvol {
    type            softvol
    slave {
        pcm         "hdmi:Generic"
    }
    control {
        name        "HDMI"
        card        0
    }
}

To enter the value of pcm (slave) I saw the output of the command "aplay -L" above.
To enter the value of "card" I saw the output of the command "aplay -l" above.

To check if the change is successful run
Code:

speaker-test -Dsoftvol -c2

you hear a rustle in the left, then in the right


Now appears in alsamixer the volume bar "HDMI" (to see the new bar is need to run the command above. I haven't studied the reason).
With alsamixer I can adjust the volume to the command above...but you can't adjust the volume in the browser.


//
To adjust the volume in the browser
replace in /etc/asound.conf
Code:

pcm.!default {
type hw
card 0
device 3
}

with
Code:

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

With the following commands you hear the sound
Code:

mplayer /usr/share/audio/ivy.mp3
aplay /usr/share/audio/beep_high.wav


Now I can listen to the audio in the browser and adjust the volume with alsamixer (don't need reboot).

------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
QUICK PROCEDURE

Create the file /etc/asound.conf with the following content
Code:

pcm.!default {
    type             plug
    slave.pcm       "softvol"
}
pcm.softvol {
    type            softvol
    slave {
        pcm         "hdmi:Generic"
    }
    control {
        name        "HDMI"
        card        0
    }
}

To see in alsamixer the new "HDMI" bar, is need to run (I haven't studied the reason)
Code:

mplayer /usr/share/audio/ivy.mp3
aplay /usr/share/audio/beep_high.wav

With the above commands you hear the sound.

Now I can listen to the audio in the browser and adjust the volume with alsamixer (don't need reboot).

If reboot, everything works!
...and now, listen to Rock and Roll!!

Cool Cool Cool Cool
Back to top
View user's profile Send private message 
maxvolodya

Joined: 07 Dec 2014
Posts: 1

PostPosted: Sun 07 Dec 2014, 20:35    Post subject: Re: Audio via HDMI  

tone wrote:
This topic starts from the situation created ...


sorry for my English. i never been at tshis forum. but i registraded specially for say to you, tone, THANKYOU! I search three days to find how to use ( Smile don't know better word for this) volume in alsa with hdmi-monitor-speackers. Here this my quest ends. and i'm happy

thank you very much )
Back to top
View user's profile Send private message 
neerajkolte


Joined: 10 Feb 2014
Posts: 413
Location: Pune, India.

PostPosted: Mon 08 Dec 2014, 00:39    Post subject:  

Welcome to the forum @maxvolodya.

Not knowing english is not a problem, feel free to post your problems or solutions.
If you really feel the need use Google translator.

I am new too.
This forum and it's friendly member's have helped me a lot.

Thanks.

- Neeraj.

_________________
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson

“We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run.”
- Amara’s Law.
Back to top
View user's profile Send private message 
tone

Joined: 25 Jul 2010
Posts: 15

PostPosted: Tue 16 Dec 2014, 06:59    Post subject:  

Hello maxvolodya, I'm happy that the topic has helped you.
Thanks to you for having shared your Smile with the forum!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0697s ][ Queries: 11 (0.0056s) ][ GZIP on ]