July 09, 2020, 04:46:31 am

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


Enable hdmi audio on boot

Started by orlonth, March 26, 2014, 01:49:04 pm

Previous topic - Next topic

orlonth

Hi,

I'm using the cubieboard as a mpd server. For this I need the hdmi audio to be enabled on every boot, whether the hdmi connected receiver is powered on or not. How do I achieve this?
The current situation is that my receiver and tv have to be powered on for the audio to be enabled.

I already tried to do the following, to no avail;

#echo on > /sys/class/graphics/fb0/power/control
#echo U:1280x720p-50 > /sys/class/graphics/fb0/mode


ravo

I'm going to assume you're using Cubian here.

Have you tried editing /boot/uEnv.txt and changing "hdmi.audio=EDID:0" to "hdmi.audio=1"?

orlonth

Yes, i'm using Cubian.
I tried what you suggested ravo, but the situation remains the same:

Failed to open mixer for 'My ALSA Device': no such mixer control: PCM

forsailbyowner

My hdmi is enabled on boot. I dont quite know the mechanics of what I did it but I created an  ~/.asoundrc file and entered the standard text from the alsa wiki.

pcm.!default {
   type hw
   card 0
}

ctl.!default {
   type hw           
   card 0
}

Now if i could figure out how to switch between the onboard sound and hdmi Id be rolling.

ballew

On my Cubietruck, I had to change card to 1 in the ~/.asoundrc file to enable my HDMI audio


$ cat /proc/asound/cards
0 [sunxicodec     ]: sunxi-CODEC - sunxi-CODEC
                      sunxi-CODEC  Audio Codec
1 [sunxisndhdmi   ]: sunxi-sndhdmi - sunxi-sndhdmi
                      sunxi-sndhdmi