[Android Q&A, Help & Troubleshooting] S7)#6$n6:
I have recently installed android x86 7.1 rc2 but unfortunately I can't get the HDMI Audio to work.

It's a Intel Core i5-2320 PC with NVidia Geforce GTX 550ti graphics card. The manufacturer did not put a HDMI Port on the motherboard so I will have to output the sound via the Graphics Card HDMI.

x86_64:/ # alsa_aplay -l

**** List of PLAYBACK Hardware Devices ****

card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]

Subdevices: 1/1

Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]

Subdevices: 1/1

Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]

Subdevices: 1/1

Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]

Subdevices: 1/1

Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]

Subdevices: 1/1

Subdevice #0: subdevice #0

the logcat when I do pkill audioserver:

12-14 17:49:41.134 1247 1247 I ServiceManager: service 'media.audio_flinger' died

12-14 17:49:41.134 1247 1247 I ServiceManager: service 'media.audio_policy' died

12-14 17:49:41.134 1247 1247 I ServiceManager: service 'media.sound_trigger_hw' died

12-14 17:49:41.134 1247 1247 I ServiceManager: service 'media.radio' died

12-14 17:49:41.134 1527 2742 W AudioSystem: AudioFlinger server died!

12-14 17:49:41.134 1597 2125 W AudioSystem: AudioPolicyService server died!

12-14 17:49:41.134 1527 2742 W SoundTrigger: Sound trigger service died!

12-14 17:49:41.134 1527 3201 W AudioSystem: AudioPolicyService server died!

12-14 17:49:41.134 1527 1583 E AudioService: Audioserver died.

12-14 17:49:41.134 1527 1527 I ServiceManager: Waiting for service media.audio_policy...

12-14 17:49:41.196 3293 3293 I audioserver: type=1400 audit(0.0:531): avc: denied { call } for scontext=u:r:init:s0 tcontext=u:r:init:s0 tclass=binder permissive=1

12-14 17:49:41.196 1247 1247 I servicemanager: type=1400 audit(0.0:532): avc: denied { transfer } for scontext=u:r:init:s0 tcontext=u:r:init:s0 tclass=binder permissive=1

12-14 17:49:41.197 3293 3293 I : sMaxFastTracks = 8

12-14 17:49:41.197 3293 3293 I audioserver: ServiceManager: 0xec01af40

12-14 17:49:41.198 3293 3293 I audioserver: type=1400 audit(0.0:533): avc: denied { write } for name="pcmC0D0p" dev="tmpfs" ino=240 scontext=u:r:init:s0 tcontext=u:object_r:audio_device:s0 tclass=chr_file permissive=1

12-14 17:49:41.198 3293 3293 I AudioFlinger: Using default 3000 mSec as standby time.

12-14 17:49:41.198 3293 3293 I AudioPolicyService: AudioPolicyService CSTOR in new mode

12-14 17:49:41.198 3293 3293 I APM::ConfigParsingUtils: loadAudioPolicyConfig() loaded /system/etc/audio_policy.conf

12-14 17:49:41.357 3293 3293 I audioserver: type=1400 audit(0.0:534): avc: denied { ioctl } for path="/dev/snd/pcmC0D0p" dev="tmpfs" ino=240 ioctlcmd=0x4101 scontext=u:r:init:s0 tcontext=u:object_r:audio_device:s0 tclass=chr_file permissive=1

12-14 17:49:41.358 3293 3293 D audio_hw_primary: found audio out at /dev/snd/pcmC0D0p

12-14 17:49:41.358 3293 3293 D audio_hw_primary: card: 0/0 id: ALC887-VD Analog

12-14 17:49:41.358 3293 3293 D audio_hw_primary: name: ALC887-VD Analog

12-14 17:49:41.358 3293 3293 D audio_hw_primary: subname: subdevice #0

12-14 17:49:41.358 3293 3293 D audio_hw_primary: stream: 0

12-14 17:49:41.370 3293 3293 D audio_hw_primary: found audio out at /dev/snd/pcmC1D3p

12-14 17:49:41.370 3293 3293 D audio_hw_primary: card: 1/3 id: HDMI 0

12-14 17:49:41.370 3293 3293 D audio_hw_primary: name: HDMI 0

12-14 17:49:41.370 3293 3293 D audio_hw_primary: subname: subdevice #0

12-14 17:49:41.370 3293 3293 D audio_hw_primary: stream: 0

12-14 17:49:41.386 3293 3293 D audio_hw_primary: found audio out at /dev/snd/pcmC1D7p

12-14 17:49:41.386 3293 3293 D audio_hw_primary: card: 1/7 id: HDMI 0

12-14 17:49:41.386 3293 3293 D audio_hw_primary: name: HDMI 0

12-14 17:49:41.386 3293 3293 D audio_hw_primary: subname: subdevice #0

12-14 17:49:41.386 3293 3293 D audio_hw_primary: stream: 0

12-14 17:49:41.386 3293 3293 D audio_hw_primary: ignore pcmC1D7p

12-14 17:49:41.402 3293 3293 D audio_hw_primary: found audio out at /dev/snd/pcmC1D8p

12-14 17:49:41.402 3293 3293 D audio_hw_primary: card: 1/8 id: HDMI 0

12-14 17:49:41.402 3293 3293 D audio_hw_primary: name: HDMI 0

12-14 17:49:41.402 3293 3293 D audio_hw_primary: subname: subdevice #0

12-14 17:49:41.402 3293 3293 D audio_hw_primary: stream: 0

12-14 17:49:41.402 3293 3293 D audio_hw_primary: ignore pcmC1D8p

12-14 17:49:41.634 1247 1247 I servicemanager: type=1400 audit(0.0:535): avc: denied { getattr } for scontext=u:r:init:s0 tcontext=u:r:system_server:s0 tclass=process permissive=1

12-14 17:49:41.635 1527 1583 E AudioService: Audioserver started.

12-14 17:49:41.802 3293 3293 D audio_hw_primary: found audio out at /dev/snd/pcmC1D9p

12-14 17:49:41.802 3293 3293 D audio_hw_primary: card: 1/9 id: HDMI 0

12-14 17:49:41.802 3293 3293 D audio_hw_primary: name: HDMI 0

12-14 17:49:41.802 3293 3293 D audio_hw_primary: subname: subdevice #0

12-14 17:49:41.802 3293 3293 D audio_hw_primary: stream: 0

12-14 17:49:41.802 3293 3293 D audio_hw_primary: ignore pcmC1D9p

12-14 17:49:41.806 3293 3293 I audio_hw_primary: choose pcmC0D0p for 0

12-14 17:49:41.806 3293 3293 E audio_hw_primary: Failed to open /system/etc/mixer_paths.xml

12-14 17:49:41.806 3293 3293 I AudioFlinger: loadHwModule() Loaded primary audio interface from Grouper audio HW HAL (audio) handle 10

12-14 17:49:41.806 3293 3293 I AudioFlinger: openOutput(), module 10 Device 2, SamplingRate 48000, Format 0x000001, Channels 3, flags 2

12-14 17:49:41.806 3293 3293 I audio_hw_primary: choose pcmC0D0p for 0

12-14 17:49:41.806 3293 3293 I AudioFlinger: HAL output buffer size 512 frames, normal sink buffer size 1024 frames

12-14 17:49:41.807 3293 3293 W EffectsFactory: loadLibrary() failed to open /system/vendor/lib/soundfx/libswdap.so

12-14 17:49:41.807 3293 3293 W EffectsFactory: loadLibrary() failed to open /system/vendor/lib/soundfx/libhwdap.so

12-14 17:49:41.807 3293 3293 W EffectsFactory: loadEffect() could not get library proxy

12-14 17:49:41.807 3293 3293 I BufferProvider: found effect "Multichannel Downmix To Stereo" from The Android Open Source Project

12-14 17:49:41.807 3293 3293 I AudioFlinger: Using module 10 has the primary audio interface

12-14 17:49:41.807 3293 3298 I AudioFlinger: AudioFlinger's thread 0xebb9b4c0 ready to run

12-14 17:49:41.808 3293 3298 W AudioFlinger: no wake lock to update, system not ready yet

12-14 17:49:41.808 3293 3298 E cutils-trace: Error opening trace file: Permission denied (13)

12-14 17:49:41.809 3293 3299 I AudioFlinger: AudioFlinger's thread 0xeb783040 ready to run

12-14 17:49:41.809 3293 3293 I bt_a2dp_hw: adev_open: adev_open in A2dp_hw module

12-14 17:49:41.809 3293 3293 I AudioFlinger: loadHwModule() Loaded a2dp audio interface from A2DP Audio HW HAL (audio) handle 18

12-14 17:49:41.810 3293 3293 I AudioFlinger: loadHwModule() Loaded usb audio interface from USB audio HW HAL (audio) handle 26

12-14 17:49:41.810 3293 3293 I RadioService: RadioService

12-14 17:49:41.810 3293 3293 I RadioService: onFirstRef

12-14 17:49:41.810 3293 3293 E RadioService: couldn't load radio module radio.primary (No such file or directory)

12-14 17:49:41.810 3293 3293 E SoundTriggerHwService: couldn't load sound trigger module sound_trigger.primary (No such file or directory)

12-14 17:49:41.810 3293 3293 D PermissionCache: checking android.permission.MODIFY_AUDIO_SETTINGS for uid=1000 => granted (129 us)

12-14 17:49:42.135 3293 3301 W APM::AudioPolicyEngine: setPhoneState() setting same state 0

12-14 17:49:42.135 3293 3301 W APM_AudioPolicyManager: setPhoneState() invalid or same state 0

12-14 17:49:42.136 1527 1527 I Binder:1527_B: type=1400 audit(0.0:536): avc: denied { setsched } for scontext=u:r:system_server:s0 tcontext=u:r:init:s0 tclass=process permissive=1

12-14 17:49:42.137 3293 3301 I AudioFlinger: systemReady

I've tried

setprop hal.audio.out pcmC1D3p

pkill audioserver

for all four NVidia Devices but still no sound.

the logcat of that:

12-14 17:55:15.804 1247 1247 I ServiceManager: service 'media.audio_flinger' died

12-14 17:55:15.804 1247 1247 I ServiceManager: service 'media.audio_policy' died

12-14 17:55:15.804 1247 1247 I ServiceManager: service 'media.sound_trigger_hw' died

12-14 17:55:15.804 1527 1539 W AudioSystem: AudioFlinger server died!

12-14 17:55:15.804 1527 1824 W AudioSystem: AudioPolicyService server died!

12-14 17:55:15.804 1247 1247 I ServiceManager: service 'media.radio' died

12-14 17:55:15.804 1527 1583 E AudioService: Audioserver died.

12-14 17:55:15.804 1527 1527 I ServiceManager: Waiting for service media.audio_policy...

12-14 17:55:15.869 3419 3419 I : sMaxFastTracks = 8

12-14 17:55:15.869 3419 3419 I audioserver: ServiceManager: 0xe791af40

12-14 17:55:15.870 3419 3419 I AudioFlinger: Using default 3000 mSec as standby time.

12-14 17:55:15.870 3419 3419 I AudioPolicyService: AudioPolicyService CSTOR in new mode

12-14 17:55:15.870 3419 3419 I APM::ConfigParsingUtils: loadAudioPolicyConfig() loaded /system/etc/audio_policy.conf

12-14 17:55:15.871 3419 3419 I audio_hw_primary: using pcmC1D3p from property

12-14 17:55:15.883 3419 3419 D audio_hw_primary: found audio out at /dev/snd/pcmC1D3p

12-14 17:55:15.883 3419 3419 D audio_hw_primary: card: 1/3 id: HDMI 0

12-14 17:55:15.883 3419 3419 D audio_hw_primary: name: HDMI 0

12-14 17:55:15.883 3419 3419 D audio_hw_primary: subname: subdevice #0

12-14 17:55:15.883 3419 3419 D audio_hw_primary: stream: 0

12-14 17:55:15.887 3419 3419 I audio_hw_primary: choose pcmC1D3p for 0

12-14 17:55:15.887 3419 3419 E audio_hw_primary: Failed to open /system/etc/mixer_paths.xml

12-14 17:55:15.887 3419 3419 I AudioFlinger: loadHwModule() Loaded primary audio interface from Grouper audio HW HAL (audio) handle 10

12-14 17:55:15.887 3419 3419 I AudioFlinger: openOutput(), module 10 Device 2, SamplingRate 48000, Format 0x000001, Channels 3, flags 2

12-14 17:55:15.887 3419 3419 I audio_hw_primary: choose pcmC1D3p for 0

12-14 17:55:15.887 3419 3419 I AudioFlinger: HAL output buffer size 512 frames, normal sink buffer size 1024 frames

12-14 17:55:15.888 3419 3419 W EffectsFactory: loadLibrary() failed to open /system/vendor/lib/soundfx/libswdap.so

12-14 17:55:15.888 3419 3419 W EffectsFactory: loadLibrary() failed to open /system/vendor/lib/soundfx/libhwdap.so

12-14 17:55:15.888 3419 3419 W EffectsFactory: loadEffect() could not get library proxy

12-14 17:55:15.888 3419 3419 I BufferProvider: found effect "Multichannel Downmix To Stereo" from The Android Open Source Project

12-14 17:55:15.888 3419 3419 I AudioFlinger: Using module 10 has the primary audio interface

12-14 17:55:15.888 3419 3424 I AudioFlinger: AudioFlinger's thread 0xe7483c40 ready to run

12-14 17:55:15.889 3419 3424 W AudioFlinger: no wake lock to update, system not ready yet

12-14 17:55:15.889 3419 3424 E cutils-trace: Error opening trace file: Permission denied (13)

12-14 17:55:15.889 3419 3425 I AudioFlinger: AudioFlinger's thread 0xe7103b00 ready to run

12-14 17:55:15.890 3419 3419 I bt_a2dp_hw: adev_open: adev_open in A2dp_hw module

12-14 17:55:15.890 3419 3419 I AudioFlinger: loadHwModule() Loaded a2dp audio interface from A2DP Audio HW HAL (audio) handle 18

12-14 17:55:15.890 3419 3419 I AudioFlinger: loadHwModule() Loaded usb audio interface from USB audio HW HAL (audio) handle 26

12-14 17:55:15.890 3419 3419 I RadioService: RadioService

12-14 17:55:15.890 3419 3419 I RadioService: onFirstRef

12-14 17:55:15.890 3419 3419 E RadioService: couldn't load radio module radio.primary (No such file or directory)

12-14 17:55:15.890 3419 3419 E SoundTriggerHwService: couldn't load sound trigger module sound_trigger.primary (No such file or directory)

12-14 17:55:16.305 1527 1583 E AudioService: Audioserver started.

12-14 17:55:16.306 3419 3426 D PermissionCache: checking android.permission.MODIFY_AUDIO_SETTINGS for uid=1000 => granted (173 us)

12-14 17:55:16.805 3419 3428 W APM::AudioPolicyEngine: setPhoneState() setting same state 0

12-14 17:55:16.805 3419 3428 W APM_AudioPolicyManager: setPhoneState() invalid or same state 0

12-14 17:55:16.807 3419 3419 I AudioFlinger: systemReady

As you can see the device is being selected from properties as expected buut still no sound.

I have also repeated this steps with different kernel parameters. I have tried video=HDMI-A-1, video=HDMI-A-1:D, video=HDMI-A-1:e and video=1920x1080

analog audio is working btw.

Does anyone have any idea how to fix this?