273 lines
14 KiB
Diff
273 lines
14 KiB
Diff
From f636f3ee3442f805ce3fc3c61eab73856e8072be Mon Sep 17 00:00:00 2001
|
|
From: rui.huang <[email protected]>
|
|
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 @@
|
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
<rootnode>
|
|
<playback>
|
|
- <mm_normal channels="2" rate="48000" period_size="960" period_count="4" format="0" stop_threshold="-1" card="sprdphone-sc2730" pcm_device="3" apptype="AUDIO_HW_APP_PRIMARY" />
|
|
- <mmap_noirq channels="2" rate="48000" period_size="960" period_count="4" format="0" card="sprdphone-sc2730" pcm_device="1" apptype="AUDIO_HW_APP_MMAP" />
|
|
- <modem_dl channels="1" rate="8000" period_size="160" period_count="2" format="0" stop_threshold="-1" card="sprdphone-sc2730" pcm_device="8" apptype="AUDIO_HW_APP_CALL" />
|
|
- <voip channels="1" rate="16000" period_size="640" period_count="2" format="0" start_threshold="1280" card="sprdphone-sc2730" pcm_device="9" apptype="AUDIO_HW_APP_VOIP" />
|
|
- <fm channels="2" rate="32000" period_size="1280" period_count="2" format="0" stop_threshold="-1" card="sprdphone-sc2730" pcm_device="7" apptype="AUDIO_HW_APP_FM" />
|
|
- <fm_bydsp channels="2" rate="32000" period_size="1280" period_count="2" format="0" stop_threshold="-1" card="sprdphone-sc2730" pcm_device="15" apptype="AUDIO_HW_APP_DSPFM"/>
|
|
- <fast channels="2" rate="48000" period_size="960" period_count="4" format="0" card="sprdphone-sc2730" pcm_device="0" apptype="AUDIO_HW_APP_FAST"/>
|
|
- <dsp_loop channels="1" rate="8000" period_size="640" period_count="4" format="0" card="sprdphone-sc2730" pcm_device="13" apptype="AUDIO_HW_APP_DSP_LOOP"/>
|
|
+ <mm_normal channels="2" rate="48000" period_size="960" period_count="4" format="0" stop_threshold="-1" card="sprdphone-sc2730" pcm_device="5" apptype="AUDIO_HW_APP_PRIMARY" />
|
|
+ <mmap_noirq channels="2" rate="48000" period_size="960" period_count="4" format="0" card="sprdphone-sc2730" pcm_device="3" apptype="AUDIO_HW_APP_MMAP" />
|
|
+ <modem_dl channels="1" rate="8000" period_size="160" period_count="2" format="0" stop_threshold="-1" card="sprdphone-sc2730" pcm_device="7" apptype="AUDIO_HW_APP_CALL" />
|
|
+ <voip channels="1" rate="16000" period_size="640" period_count="2" format="0" start_threshold="1280" card="sprdphone-sc2730" pcm_device="8" apptype="AUDIO_HW_APP_VOIP" />
|
|
+ <fm channels="2" rate="32000" period_size="1280" period_count="2" format="0" stop_threshold="-1" card="sprdphone-sc2730" pcm_device="9" apptype="AUDIO_HW_APP_FM" />
|
|
+ <fm_bydsp channels="2" rate="32000" period_size="1280" period_count="2" format="0" stop_threshold="-1" card="sprdphone-sc2730" pcm_device="17" apptype="AUDIO_HW_APP_DSPFM"/>
|
|
+ <fast channels="2" rate="48000" period_size="960" period_count="4" format="0" card="sprdphone-sc2730" pcm_device="5" apptype="AUDIO_HW_APP_FAST"/>
|
|
+ <dsp_loop channels="1" rate="8000" period_size="640" period_count="4" format="0" card="sprdphone-sc2730" pcm_device="12" apptype="AUDIO_HW_APP_DSP_LOOP"/>
|
|
</playback>
|
|
<record>
|
|
- <recognition channels="1" period_size="960" period_count="2" format="0" rate="48000" card="sprdphone-sc2730" pcm_device="0" apptype="AUDIO_HW_APP_RECOGNITION" />
|
|
- <mm_normal channels="2" period_size="1920" period_count="4" format="0" start_threshold="1920" rate="48000" card="sprdphone-sc2730" pcm_device="5" apptype="AUDIO_HW_APP_NORMAL_RECORD" />
|
|
- <mmap_noirq channels="1" period_size="960" period_count="2" format="0" rate="48000" card="sprdphone-sc2730" pcm_device="1" apptype="AUDIO_HW_APP_MMAP_RECORD" />
|
|
- <modem_ul channels="1" rate="8000" period_size="160" period_count="2" format="0" stop_threshold="-1" card="sprdphone-sc2730" pcm_device="8" apptype="AUDIO_HW_APP_CALL" />
|
|
- <voip channels="1" rate="16000" period_size="640" period_count="2" format="0" start_threshold="1280" card="sprdphone-sc2730" pcm_device="9" apptype="AUDIO_HW_APP_VOIP_RECORD" />
|
|
- <fm channels="2" rate="48000" period_size="960" period_count="2" format="0" card="sprdphone-sc2730" pcm_device="13" apptype="AUDIO_HW_APP_FM_RECORD" />
|
|
- <voice_c channels="1" period_size="960" period_count="2" format="0" rate="8000" card="sprdphone-sc2730" pcm_device="9" apptype="AUDIO_HW_APP_CALL_RECORD" />
|
|
- <dsp_loop channels="1" rate="8000" period_size="640" period_count="4" format="0" card="sprdphone-sc2730" pcm_device="13" apptype="AUDIO_HW_APP_DSP_LOOP" />
|
|
- <btsco_record channels="1" period_size="960" period_count="2" format="0" rate="48000" card="sprdphone-sc2730" pcm_device="14" apptype="AUDIO_HW_APP_BT_RECORD" />
|
|
- <vbcdump channels="1" rate="48000" period_size="640" period_count="8" format="0" card="sprdphone-sc2730" pcm_device="16" apptype="AUDIO_HW_APP_VBC_PCM_DUMP" />
|
|
+ <recognition channels="1" period_size="960" period_count="2" format="0" rate="48000" card="sprdphone-sc2730" pcm_device="2" apptype="AUDIO_HW_APP_RECOGNITION" />
|
|
+ <mm_normal channels="1" period_size="1920" period_count="4" format="0" start_threshold="1920" rate="48000" card="sprdphone-sc2730" pcm_device="4" apptype="AUDIO_HW_APP_NORMAL_RECORD" />
|
|
+ <mmap_noirq channels="1" period_size="960" period_count="2" format="0" rate="48000" card="sprdphone-sc2730" pcm_device="6" apptype="AUDIO_HW_APP_MMAP_RECORD" />
|
|
+ <modem_ul channels="1" rate="8000" period_size="160" period_count="2" format="0" stop_threshold="-1" card="sprdphone-sc2730" pcm_device="7" apptype="AUDIO_HW_APP_CALL" />
|
|
+ <voip channels="1" rate="16000" period_size="640" period_count="2" format="0" start_threshold="1280" card="sprdphone-sc2730" pcm_device="8" apptype="AUDIO_HW_APP_VOIP_RECORD" />
|
|
+ <fm channels="2" rate="48000" period_size="960" period_count="2" format="0" card="sprdphone-sc2730" pcm_device="10" apptype="AUDIO_HW_APP_FM_RECORD" />
|
|
+ <voice_c channels="1" period_size="960" period_count="2" format="0" rate="8000" card="sprdphone-sc2730" pcm_device="11" apptype="AUDIO_HW_APP_CALL_RECORD" />
|
|
+ <dsp_loop channels="1" rate="8000" period_size="640" period_count="4" format="0" card="sprdphone-sc2730" pcm_device="12" apptype="AUDIO_HW_APP_DSP_LOOP" />
|
|
+ <btsco_record channels="1" period_size="960" period_count="2" format="0" rate="48000" card="sprdphone-sc2730" pcm_device="19" apptype="AUDIO_HW_APP_BT_RECORD" />
|
|
+ <vbcdump channels="1" rate="48000" period_size="640" period_count="8" format="0" card="sprdphone-sc2730" pcm_device="18" apptype="AUDIO_HW_APP_VBC_PCM_DUMP" />
|
|
</record>
|
|
- <compress fragment_size="0x5000" fragments="0x40" card="sprdphone-sc2730" pcm_device="0x04" apptype="AUDIO_HW_APP_OFFLOAD" />
|
|
+ <compress fragment_size="0x5000" fragments="0x40" card="sprdphone-sc2730" pcm_device="0x06" apptype="AUDIO_HW_APP_OFFLOAD" />
|
|
<!--Note:modify period_size and period_count affect the latency-->
|
|
<offload>
|
|
<a2dp>
|
|
- <mixer channels="2" rate="48000" period_size="960" period_count="4" format="0" stop_threshold="-1" card="sprdphone-sc2730" device="12"/>
|
|
- <compress fragment_size="0x5000" fragments="0x08" card="sprdphone-sc2730" device="11"/>
|
|
+ <mixer channels="2" rate="48000" period_size="960" period_count="4" format="0" stop_threshold="-1" card="sprdphone-sc2730" device="14"/>
|
|
+ <compress fragment_size="0x5000" fragments="0x08" card="sprdphone-sc2730" device="13"/>
|
|
</a2dp>
|
|
</offload>
|
|
</rootnode>
|
|
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
|