intel hdmi audio + intel onboard audio + usb audio

7,529 views
Skip to first unread message

hatharry

unread,
Apr 18, 2015, 10:59:37 AM4/18/15
to andro...@googlegroups.com
i have found a way to to get all of my audio working on my brix pro.

the order is usb audio, onboard audio then hdmi audio (disable onboard in bios for hdmi audio).

i had to patch the kernel and add kernel parameters:

add the below code to the linux line of your menu.lst or grub.cfg:

snd_usb_audio.index=0 snd_hda_intel.index=2,1

if you can not disable onboard but want to use hdmi change: snd_hda_intel.index=2,1  to  snd_hda_intel.index=1,2

and apply the patch attached
hdmi_audio.patch

Ali Razavi

unread,
Apr 18, 2015, 12:48:15 PM4/18/15
to andro...@googlegroups.com
Hi,
thank you for your patch, I have Intel HD on my PC, Audio not working on my HDMI port in Android x86 4.4.4.
who can I use your patch for fixing this Audio problem?? I have Disable option for HD Audio in BIOS, Who can use your patch.
sorry I'm beginner !

hatharry

unread,
Apr 18, 2015, 1:33:03 PM4/18/15
to andro...@googlegroups.com
Download a live linux eg linux mint, ubuntu etc...

Boot into linux

Replace the kernel with this kernel

Add the lines above to menu.lst

Ali Razavi

unread,
Apr 18, 2015, 1:59:59 PM4/18/15
to andro...@googlegroups.com
thank you,
I search all my device for menu.lst and grub.cfg but not found! I use file manager and this command in terminal emulator: find / -type f -name "grub.cfg" and find / -type f -name "menu.lst"

hatharry

unread,
Apr 18, 2015, 2:10:52 PM4/18/15
to andro...@googlegroups.com
up to date kernel

you will not find menu.lst in android. you will need to boot a live version of linux from usb or cd.

Ali Razavi

unread,
Apr 18, 2015, 4:33:26 PM4/18/15
to andro...@googlegroups.com
after boot by Ubuntu and copy the new files and edit menu.lst android don't boot, I have to back my original files to boot android again !!!

hatharry

unread,
Apr 18, 2015, 10:39:08 PM4/18/15
to andro...@googlegroups.com
Lets make this easier. Please just replace this file.

Ali Razavi

unread,
Apr 19, 2015, 11:36:10 AM4/19/15
to andro...@googlegroups.com
thanks again,
I just copy that file to /system/lib/modules/3.18.0-android-x86+/kernel/sound/pci/hda/ and rename the my old file to snd-hda-codec.ko.old. After reboot android, sound not working. not at HDMI port not at audio out port.
please check my menu.lst file, this is correct ?!

thank you again
menu.lst

hatharry

unread,
Apr 19, 2015, 11:43:18 AM4/19/15
to andro...@googlegroups.com
menu.lst is not correct . it should be:

kernel /android-4.4-r2/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 SRC=/android-4.4-r2 snd_usb_audio.index=0 snd_hda_intel.index=2,1

can you also run in android

sudo alsa_aplay -l

that should give the order

Ali Razavi

unread,
Apr 19, 2015, 2:14:22 PM4/19/15
to andro...@googlegroups.com
I changed the menu.lst in correct format, but when reboot android sound not work.
when I run "sudo alsa_aplay -l" in terminal the output is: aplay: device_list: 241: no soundcards found...

hatharry

unread,
Apr 19, 2015, 11:38:13 PM4/19/15
to andro...@googlegroups.com
try:

su

alsa_aplay -l

Ali Razavi

unread,
Apr 20, 2015, 1:53:39 AM4/20/15
to andro...@googlegroups.com
the result is same: aplay: device_list: 241: no soundcards found...
I think menu.lst file is not correct for me, because when I recover the original snd-hda-codec.ko file again sound not work.
I just need HDMI sound, I haven't USB sound card.

hatharry

unread,
Apr 20, 2015, 3:05:04 AM4/20/15
to andro...@googlegroups.com
Does sound work in ubuntu? Put the menu.lst back to normal and enable onboard sound and check Alsa_aplay again. Doesnt look like any devices are found.

Ali Razavi

unread,
Apr 20, 2015, 2:54:29 PM4/20/15
to andro...@googlegroups.com
HDMI sound and normal outpot sound in Ubuntu Live working good.  When I put menu.lst in normal mode and enable onboard sound in bios, the "alsa_aplay -l" output is: aplay: device_list: 241: no soundcards found...

hatharry

unread,
Apr 20, 2015, 3:04:52 PM4/20/15
to andro...@googlegroups.com
Looks like you are not using superuser. Please make sure terminal is granted access.

First command should be: su

You should see #

Then enter alsa-aplay

Ali Razavi

unread,
Apr 20, 2015, 3:29:22 PM4/20/15
to andro...@googlegroups.com
I use SU and run command in Super User mode.

when I recover the original KO file and reboot the android the output of alsa-play -l is:
root@x86:/ # alsa_aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC662 rev3 Analog [ALC662 rev3 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

but whit your KO file the output is:

aplay: device_list: 241: no soundcards found...



thanks

hatharry

unread,
Apr 20, 2015, 4:42:15 PM4/20/15
to andro...@googlegroups.com
thanks for testing.

use this kernel and disable onboard sound

Chih-Wei Huang

unread,
Apr 20, 2015, 10:30:24 PM4/20/15
to Android-x86
Hi hatharry,
Thank you for the patch.
However, it seems to be a dirty hack that
I'm reluctant to merge it to the codebase.

I think the correct way to support HDMI audio
is to create an audio HAL (audio.hdmi.xxx.so)
for it. The audio_policy.conf is probably needed
to be modified as well.
This is the way that most android tablets do
I've seen.


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

hatharry

unread,
Apr 21, 2015, 12:22:12 AM4/21/15
to andro...@googlegroups.com
I also agree with you. I will try find some examples so we can make it work without dirty hacks

hatharry

unread,
Apr 21, 2015, 9:28:44 AM4/21/15
to andro...@googlegroups.com
Am i right in saying this code in audio_hw.c:

static int select_card(int d)
{
    int i;
    char dname[32];
    for (i = 0; i < 3; ++i) {
        sprintf(dname, "/dev/snd/pcmC%dD0%c", i, (d == PCM_IN) ? 'c' : 'p');
        if (!access(dname, R_OK | W_OK)) {
            ALOGD("found %s %s", (d == PCM_IN) ? "in" : "out", dname);
            return i;
        }
    }
    ALOGE("no pcm card found!");
    return -1;
}

is looking for pcmC0D0p, but hdmi device start at pcmC0D3p?

Ali Razavi

unread,
Apr 21, 2015, 12:54:26 PM4/21/15
to andro...@googlegroups.com
Can I run a script on terminal for switch default sound to HDMI ???

Ali Razavi

unread,
Apr 21, 2015, 2:32:23 PM4/21/15
to andro...@googlegroups.com
Unfortunately after replace the kernel files, android does not boot again :( and I miss the old files.
I want install a new android x86, please help me what version I must install for best performance and stable????
thanks

hatharry

unread,
Apr 22, 2015, 9:56:52 AM4/22/15
to andro...@googlegroups.com
www.android-x86.org/getsourcecode

The Kitkat branch is the most stable

simon...@gmail.com

unread,
Jul 23, 2015, 11:00:47 PM7/23/15
to Android-x86, hath...@gmail.com
Hello
I have a gigabyte brix too but mine is model bxbt-1900 (baytrail)
the device order I got when I use the alsa_aplay -l command is analog=0 HDMI=3 no USB or digital, also if I disable onboard audio from BIOS the same command says there's no audio hardware so I can't disable it. What do I have to change to use your patch? I'll be very grateful if you help me

Luke McIntyre

unread,
Jul 24, 2015, 1:06:36 AM7/24/15
to Android-x86
You need to apply the kernel patch and re-compile. Hdmi will then be at device 0

Stepan T

unread,
Jul 28, 2015, 12:45:15 AM7/28/15
to Android-x86, hath...@gmail.com
воскресенье, 19 апреля 2015 г., 0:59:37 UTC+10 пользователь Luke McIntyre написал:
Hello!

Does it trick works on ATI video adapter?

Jason Pereira

unread,
Oct 14, 2015, 4:31:39 AM10/14/15
to Android-x86
Hi Luke,

I am a newbie. Could you please give me the steps on how to patch the kernel and add kernel parameter.

Thank you,
Jason

Luke

unread,
Oct 14, 2015, 5:21:48 AM10/14/15
to Android-x86
have you downloaded the source? that would be a good start.

Francesco Mirizzi

unread,
Jan 5, 2016, 10:13:51 PM1/5/16
to Android-x86
Hi,
I've a bay trail pentium j2900, I've no audio trough hdmi, can you help me how can I solve this problem?
What android-x86 have to install? I've also install same patch?
Thank you advise.

Luke

unread,
Jan 6, 2016, 7:03:15 AM1/6/16
to Android-x86

Download the kitkat source then apply the patch to the kernel.

Francesco Mirizzi

unread,
Jan 8, 2016, 10:32:13 PM1/8/16
to Android-x86
I'm newbie, can you help me to find same tutorial to apply patch and compile a kernel?
Is there any way to apply the same patch to android 6?
Thank you advise

Mutlu Can Yilmaz

unread,
Feb 1, 2016, 12:18:42 PM2/1/16
to Android-x86
What about nvidia?

18 Nisan 2015 Cumartesi 17:59:37 UTC+3 tarihinde Luke yazdı:

Brandon Taylor

unread,
Apr 1, 2018, 11:28:58 PM4/1/18
to Android-x86
I recently installed Manjaro Linux on my computer (any Linux distro should work, right?). Using the "locate" command ("locate audio.hdmi"), I couldn't find any files named "audio.hdmi.*.so". So, my next step was to do "locate audio | grep hdmi", and I found a compressed file called "snd-hdmi-lpe-audio.ko.xz" in my kernel modules folder. The compressed file contained one file, which I extracted and stored on my Google Drive. Here's a link to the file in question. Let me know what you make of it.
Reply all
Reply to author
Forward
0 new messages