From f636f3ee3442f805ce3fc3c61eab73856e8072be Mon Sep 17 00:00:00 2001 From: rui.huang Date: Thu, 09 Jul 2026 11:16:02 +0800 Subject: [PATCH] Bug #3463060 - bipai audio-buringup - layers [root cause ]: samplecode [changes ]: 1.aw87390(AO); 2.3.5mm headset(NC); 3single mic [side effects]:na [self test ]:na [download normally]:na [power on/off normally]:na [do common repository/branch inspection]:na [is there dependence]:na [confirm dependent commit]:na [board]:na [test case]:na [reviewers]:na commit_template_version:v1 Change-Id: I6e4e1f40f3c556ce9057ebb6eca0dec2670e0ae1 --- diff --git a/recipes-kernel/linux/linux-unisoc-5.4/uis7885/uis7885-2h10-audio.cfg b/recipes-kernel/linux/linux-unisoc-5.4/uis7885/uis7885-2h10-audio.cfg index c654341..94be331 100755 --- a/recipes-kernel/linux/linux-unisoc-5.4/uis7885/uis7885-2h10-audio.cfg +++ b/recipes-kernel/linux/linux-unisoc-5.4/uis7885/uis7885-2h10-audio.cfg @@ -39,7 +39,7 @@ # # SPRD Codec # -CONFIG_SND_SOC_UNISOC_PA_UCP1301=y +# CONFIG_SND_SOC_UNISOC_PA_UCP1301=y # CONFIG_SND_SOC_UNISOC_CODEC_SC2721 is not set CONFIG_SND_SOC_UNISOC_PDM_R2P0=y CONFIG_SND_SOC_UNISOC_CODEC_UMP9620=y @@ -48,6 +48,11 @@ # CONFIG_SND_SOC_UNISOC_CODEC_NO_HP_POP is not set # end of SPRD Codec +# +# Third PA +# +CONFIG_SND_SOC_AW87XXX=y + CONFIG_SND_SOC_UNISOC_CODEC_DUMMY=y # diff --git a/recipes-kernel/linux/linux-unisoc-5.4/uis7885/uis7885-2h10-overlay.dts b/recipes-kernel/linux/linux-unisoc-5.4/uis7885/uis7885-2h10-overlay.dts index 02c344b..28804f2 100755 --- a/recipes-kernel/linux/linux-unisoc-5.4/uis7885/uis7885-2h10-overlay.dts +++ b/recipes-kernel/linux/linux-unisoc-5.4/uis7885/uis7885-2h10-overlay.dts @@ -407,13 +407,6 @@ #address-cells = <1>; #size-cells = <0>; - ucp1301_spk: ucp1301@58 { - compatible = "sprd,ucp1301-spk"; - reg = <0x58>; - reset-gpios = <&ap_gpio 120 GPIO_ACTIVE_HIGH>; - #sound-dai-cells = <1>; - }; - bq2560x_chg: charger@6b { compatible = "ti,bq2560x_chg"; reg = <0x6b>; @@ -788,6 +781,14 @@ #address-cells = <1>; #size-cells = <0>; + aw87xxx_pa@58 { + compatible = "awinic,aw87xxx_pa"; + reg = <0x58>; + /* reset-gpio = <&ap_gpio 1 0>;*/ + dev_index = < 0 >; + status = "okay"; + }; + flash_ic: flash-ic@63 { compatible = "sprd,flash-ocp8137"; reg = <0x63>; @@ -812,48 +813,12 @@ &sprd_headset { status = "okay"; - extcon = <&pmic_typec>; - mic-gpios = <&ap_gpio 62 GPIO_ACTIVE_HIGH>; - lr-gpios = <&ap_gpio 61 GPIO_ACTIVE_HIGH>; - sprd,3pole-adc-threshold = <112>; + sprd,jack-type = <1>; /* 0: normal-open jack; 1: normal-close jack */ }; &sound_vbc_v4_sprd_codec { status = "okay"; - sprd-audio-card,routing = - "HPMIC Pin", "HP Mic Jack", - "MIC Pin", "Mic Jack", - "MIC2 Pin", "Aux Mic Jack", - "MIC3 Pin", "Aux Mic2 Jack", - "HeadPhone Jack", "HP Pin", - "Ext Spk", "SPK Pin", - "UCP1301 SPK ON", "SPK Pin", - "Ext Spk", "UCP1301 SPK", - "PDM DMIC2 ON", "SPK Pin", - "Ext Spk", "PDM_DMIC2", - "DMIC Pin", "DMic Jack", - "DMIC1 Pin", "DMic1 Jack", - "Ext Ear", "EAR Pin"; - - /* 35: ucp1301 normal ap01 */ - sprd-audio-card,dai-link@53 { - ignore-suspend = <1>; - link-name = "BE_NORMAL_AP01_UCPSPK"; - stream-name = "BE_ST_NORMAL_AP01_UCPSPK"; - no-pcm = <1>; - dpcm-playback = <1>; - be-id = <0>; - dai-format = "i2s"; - plat { - sound-dai = <&sprd_route_pcm>; - }; - cpu { - sound-dai = <&vbc_v4 31>; - }; - codec { - sound-dai = <&ucp1301_spk 0>; - }; - }; + extral-iic-pa-cnt = <1>; /* * node 54 and node 55 (index 36 and 37) are reserved for diff --git a/recipes-multimedia/audio/audiohal-phoenix.bb b/recipes-multimedia/audio/audiohal-phoenix.bb index faba3b7..b1029fb 100755 --- a/recipes-multimedia/audio/audiohal-phoenix.bb +++ b/recipes-multimedia/audio/audiohal-phoenix.bb @@ -68,9 +68,14 @@ ln -sf /var/audio/audio_params/dsp_vbc ${D}${nonarch_base_libdir}/firmware/dsp_vbc ln -sf /var/audio/audio_params/cvs ${D}${nonarch_base_libdir}/firmware/cvs ln -sf /var/audio/audio_params/audio_structure ${D}${nonarch_base_libdir}/firmware/audio_structure + if [ "${MACHINE}" = "uis7885-1c10" ]; then install -m 0777 ${THISDIR}/files/${MACHINE}/aw87394/stereo/aw87xxx_acf.bin ${D}${nonarch_base_libdir}/firmware/aw87xxx_acf.bin fi + + if [ "${MACHINE}" = "uis7885-2h10" ]; then + install -m 0777 ${THISDIR}/files/${MACHINE}/aw87390/mono/aw87xxx_acf.bin ${D}${nonarch_base_libdir}/firmware/aw87xxx_acf.bin + fi } FILES:${PN} += "/lib/firmware/*" diff --git a/recipes-multimedia/audio/files/uis7885-2h10/aw87390/mono/aw87xxx_acf.bin b/recipes-multimedia/audio/files/uis7885-2h10/aw87390/mono/aw87xxx_acf.bin new file mode 100755 index 0000000..fe3474d --- /dev/null +++ b/recipes-multimedia/audio/files/uis7885-2h10/aw87390/mono/aw87xxx_acf.bin Binary files differ diff --git a/recipes-multimedia/audio/files/uis7885-2h10/aw87390/stereo/aw87xxx_acf.bin b/recipes-multimedia/audio/files/uis7885-2h10/aw87390/stereo/aw87xxx_acf.bin new file mode 100755 index 0000000..4b3c8b5 --- /dev/null +++ b/recipes-multimedia/audio/files/uis7885-2h10/aw87390/stereo/aw87xxx_acf.bin Binary files differ diff --git a/recipes-multimedia/audio/files/uis7885-2h10/config/audio_pcm.xml b/recipes-multimedia/audio/files/uis7885-2h10/config/audio_pcm.xml index 5c48645..af650fa 100755 --- a/recipes-multimedia/audio/files/uis7885-2h10/config/audio_pcm.xml +++ b/recipes-multimedia/audio/files/uis7885-2h10/config/audio_pcm.xml @@ -1,33 +1,33 @@ - - - - - - - - + + + + + + + + - - - - - - - - - - + + + + + + + + + + - + - - + + diff --git a/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-15.0/0003-Bug-GLP3.0-add-unisoc-daemon-config.patch b/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-15.0/0003-Bug-GLP3.0-add-unisoc-daemon-config.patch index e8e8f27..1762b86 100755 --- a/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-15.0/0003-Bug-GLP3.0-add-unisoc-daemon-config.patch +++ b/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-15.0/0003-Bug-GLP3.0-add-unisoc-daemon-config.patch @@ -9,7 +9,7 @@ -; log-target = auto -; log-level = notice +log-target = syslog -+log-level = 3 ++log-level = 4 ; log-meta = no ; log-time = no ; log-backtrace = 0 diff --git a/recipes-multimedia/pulseaudio/pulseaudio/uis7885-2h10/sprd_default.conf b/recipes-multimedia/pulseaudio/pulseaudio/uis7885-2h10/sprd_default.conf index ba04097..df918b4 100755 --- a/recipes-multimedia/pulseaudio/pulseaudio/uis7885-2h10/sprd_default.conf +++ b/recipes-multimedia/pulseaudio/pulseaudio/uis7885-2h10/sprd_default.conf @@ -28,28 +28,28 @@ [Mapping record-stereo-input] description = sprd Analog Stereo input -device-strings = hw:%f,5 +device-strings = hw:%f,4 channel-map = left,right paths-input = sprd-input-headphone-mic sprd-input-internal-mic direction = input [Mapping music-playback-output] description = sprd Analog Stereo output -device-strings = hw:%f,3 +device-strings = hw:%f,5 channel-map = left,right paths-output = speaker_output headphone_output direction = output [Mapping voip-mono-input] description = sprd voip mono input -device-strings = hw:%f,9 +device-strings = hw:%f,8 channel-map = mono paths-input = sprd-input-headphone-mic sprd-input-internal-signal-mic direction = input [Mapping voip-playback-output] description = sprd voip mono output -device-strings = hw:%f,9 +device-strings = hw:%f,8 channel-map = mono paths-output = earpiece_output speaker_output headphone_output direction = output