Sgtl5000 Audio support for android 7.1.2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sgtl5000 Audio support for android 7.1.2

1,083 Views
harishkumarts
Contributor I

Hi Team,

I am porting the sgtl5000 audio codec chip for imx6q processor and android 7.1.2 ver, here am getting the audio out in kernel level using tinyplay .wav 16bit file, So the sound is getting on headphone jack.

But the user application level it's not working, Below given the .dtsi file configuration and log.

 
Below given dtsi file configuration is using
compatible = "fsl,imx-audio-sgtl5000";
model = "imx6q-sabresd-sgtl5000";
cpu-dai = <&ssi1>;
audio-codec = <&codec>;
audio-routing =
                           "LINE_IN", "Line In Jack",
                           "MIC_IN", "Mic Jack",
                           "Mic Jack", "Mic Bias",
                           "Headphone Jack", "HP_OUT",
                           "Ext Spk", "LINE_OUT";
mux-int-port = <1>;
mux-ext-port = <4>;

Please check this log here the (primary: select_output_device >0 out_device=2)

 out_device getting value 2 but I am using the headphone interface am only getting spk interface selection.

#0: imx6q-sabresd-sgtl5000
abresd6q:/ # logcat | grep Wired
01-01 00:00:31.988 544 544 I SystemServer: StartWiredAccessoryManager
01-01 00:00:31.990 544 544 W WiredAccessoryManager: This kernel does not have wired headset support
01-01 00:00:31.991 544 544 W WiredAccessoryManager: This kernel does not have usb audio support
01-01 00:00:31.991 544 544 W WiredAccessoryManager: This kernel does not have HDMI audio support
01-01 00:00:37.212 544 544 V WiredAccessoryManager: init()
01-01 00:00:37.213 544 544 V WiredAccessoryManager: state_cable 0
01-01 00:00:37.813 544 544 I Telecom : WiredHeadsetManager: ACTION_HEADSET_PLUG event, plugged in: false, : WHC.oADA@AAE


01-01 00:00:09.294 271 271 W audio_hw_primary: card 0, id imx6qsabresdsgtl ,driver imx6q-sabresd-sg, name imx6q-sabresd-sgtl5000
01-01 00:00:09.294 271 271 W audio_hw_primary: scan_available_device >0 name:wm8958-audio
01-01 00:00:09.294 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx6q-sabresd-sg
01-01 00:00:09.294 271 271 W audio_hw_primary: scan_available_device >0 name:wm8962-audio
01-01 00:00:09.294 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx6q-sabresd-sg
01-01 00:00:09.294 271 271 W audio_hw_primary: scan_available_device >0 name:imx-hdmi-soc
01-01 00:00:09.294 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx6q-sabresd-sg
01-01 00:00:09.294 271 271 W audio_hw_primary: scan_available_device >0 name:imx-spdif
01-01 00:00:09.294 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx6q-sabresd-sg
01-01 00:00:09.294 271 271 W audio_hw_primary: scan_available_device >0 name:cs42888-audio
01-01 00:00:09.294 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx6q-sabresd-sg
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 name:wm8960-audio
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx6q-sabresd-sg
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 name:sii902x-audio
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx6q-sabresd-sg
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 name:wm8958-audio
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx6q-sabresd-sg
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 name:rpmsg-audio
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx6q-sabresd-sg
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 name:imx6ul-sgtl5000
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx6q-sabresd-sg
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 name:null_card
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx6q-sabresd-sg
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >4
01-01 00:00:09.295 271 271 W audio_hw_primary: card 1, id imxspdif ,driver imx-spdif, name imx-spdif
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 name:wm8958-audio
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx-spdif
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 name:wm8962-audio
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx-spdif
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 name:imx-hdmi-soc
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx-spdif
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 name:imx-spdif
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx-spdif
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >1
01-01 00:00:09.295 271 271 W audio_hw_primary: scan_available_device >2
01-01 00:00:09.296 271 271 W audio_hw_primary: scan_available_device >3
01-01 00:00:09.299 271 271 W audio_hw_primary: scan_available_device >4
01-01 00:00:09.299 271 271 W audio_hw_primary: card 2, id imxhdmisoc ,driver imx-hdmi-soc, name imx-hdmi-soc
01-01 00:00:09.299 271 271 W audio_hw_primary: scan_available_device >0 name:wm8958-audio
01-01 00:00:09.299 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx-hdmi-soc
01-01 00:00:09.299 271 271 W audio_hw_primary: scan_available_device >0 name:wm8962-audio
01-01 00:00:09.299 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx-hdmi-soc
01-01 00:00:09.299 271 271 W audio_hw_primary: scan_available_device >0 name:imx-hdmi-soc
01-01 00:00:09.300 271 271 W audio_hw_primary: scan_available_device >0 Cardname:imx-hdmi-soc
01-01 00:00:09.300 271 271 W audio_hw_primary: scan_available_device >1
01-01 00:00:09.300 271 271 W audio_hw_primary: scan_available_device >2
01-01 00:00:09.300 271 271 W audio_hw_primary: scan_available_device >3
01-01 00:00:09.300 271 271 W audio_hw_primary: scan_available_device >4
01-01 00:00:09.300 271 271 W audio_hw_primary: adev_open >0
01-01 00:00:09.301 271 271 W audio_hw_primary: select_output_device >0 out_device=2

Please help to resolve this for user level access.

Thanks & regards,

Harish.

0 Kudos
2 Replies

721 Views
deexithamba
Contributor III

Hello,

Just try to write the model name within 15 characters and your card will be detected at the user-level. Give it a try, i had solved this with the same,

For ex:

model = "imx6q-sabresd-sgtl5000"; change this to something like -----> model = "sabre-sgtl5000"; and the same name must be reflecting in the HAL layer in .driver name of that particular codec.

Regards,

Deexith

0 Kudos

721 Views
pavandornadula7
Contributor I

hello harish,

Can u plzz tell me where exactly to refer for assigning internal and external mux ports

0 Kudos