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: Select all
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
//
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: Select all
mplayer -ao alsa:device=hw=0.3 /usr/share/audio/ivy.mp3
aplay -D plughw:0,3 /usr/share/audio/beep_high.wav
Code: Select all
mplayer /usr/share/audio/ivy.mp3
aplay /usr/share/audio/beep_high.wav
//
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: Select all
pcm.!default {
type hw
card 0
device 3
}
With the following command you hear the sound (don't need reboot)
Code: Select all
mplayer /usr/share/audio/ivy.mp3
Code: Select all
aplay /usr/share/audio/beep_high.wav
//
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_soft ... ter_volume
Now in alsamixer there's only the "S/PDIF" voice
//
To verify that I'm using the right device:
Code: Select all
speaker-test -Dhdmi:Generic -c2
to determine "-D"
Code: Select all
aplay -L
hdmi:CARD=Generic,DEV=0
HD-Audio Generic, HDMI 0
HDMI Audio Output
//
add to /etc/asound.conf
Code: Select all
pcm.softvol {
type softvol
slave {
pcm "hdmi:Generic"
}
control {
name "HDMI"
card 0
}
}
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: Select all
speaker-test -Dsoftvol -c2
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: Select all
pcm.!default {
type hw
card 0
device 3
}
Code: Select all
pcm.!default {
type plug
slave.pcm "softvol"
}
Code: Select all
mplayer /usr/share/audio/ivy.mp3
aplay /usr/share/audio/beep_high.wav
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
QUICK PROCEDURE
Create the file /etc/asound.conf with the following content
Code: Select all
pcm.!default {
type plug
slave.pcm "softvol"
}
pcm.softvol {
type softvol
slave {
pcm "hdmi:Generic"
}
control {
name "HDMI"
card 0
}
}
Code: Select all
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).
If reboot, everything works!
...and now, listen to Rock and Roll!!