From 101170100bf7b7198a0661a04df51c007bb71a43 Mon Sep 17 00:00:00 2001 From: Keqiao Zhang Date: Fri, 17 Mar 2023 10:06:57 +0800 Subject: [PATCH 1/2] amixer_settings: adjust amixer settings for IPC4 platforms Signed-off-by: Keqiao Zhang --- alsa_settings/ADLP_RVP_SDW_IPC4ZPH.sh | 10 ++++++++++ alsa_settings/MTLP_RVP_HDA.sh | 7 ++++--- alsa_settings/MTLP_RVP_SDW.sh | 10 ++++++---- alsa_settings/TGLU_RVP_SDW_IPC4ZPH.sh | 10 ++++++++++ alsa_settings/TGLU_UP_HDA_IPC4ZPH.sh | 9 +++++++++ 5 files changed, 39 insertions(+), 7 deletions(-) create mode 100755 alsa_settings/ADLP_RVP_SDW_IPC4ZPH.sh create mode 100755 alsa_settings/TGLU_RVP_SDW_IPC4ZPH.sh create mode 100755 alsa_settings/TGLU_UP_HDA_IPC4ZPH.sh diff --git a/alsa_settings/ADLP_RVP_SDW_IPC4ZPH.sh b/alsa_settings/ADLP_RVP_SDW_IPC4ZPH.sh new file mode 100755 index 00000000..a858b3ca --- /dev/null +++ b/alsa_settings/ADLP_RVP_SDW_IPC4ZPH.sh @@ -0,0 +1,10 @@ +set -e + +# enable headset playback +amixer -c sofsoundwire cset name='Headphone Switch' on +amixer -c sofsoundwire cset name='rt711 DAC Surr Playback Volume' 70 + +# enable headset capture +amixer -c sofsoundwire cset name='Headset Mic Switch' on +amixer -c sofsoundwire cset name='rt711 ADC 08 Capture Switch' on +amixer -c sofsoundwire cset name='rt711 ADC 08 Capture Volume' 25 diff --git a/alsa_settings/MTLP_RVP_HDA.sh b/alsa_settings/MTLP_RVP_HDA.sh index b8dbdfa8..6978c6cc 100755 --- a/alsa_settings/MTLP_RVP_HDA.sh +++ b/alsa_settings/MTLP_RVP_HDA.sh @@ -5,6 +5,7 @@ amixer -c sofhdadsp cset name='Master Playback Switch' 1 amixer -c sofhdadsp cset name='Master Playback Volume' 87 amixer -c sofhdadsp cset name='Headphone Playback Switch' 1 amixer -c sofhdadsp cset name='Headphone Playback Volume' 60 -amixer -c sofhdadsp cset name='gain.1.1 1 2nd Playback Volume' 45 -amixer -c sofhdadsp cset name='gain.2.1 2 Main Playback Volume' 45 -amixer -c sofhdadsp cset name='gain.5.1 5 3nd Playback Volume' 45 + +# enable headset capture +amixer -c sofhdadsp cset name='Capture Switch' on +amixer -c sofhdadsp cset name='Capture Volume' 30 diff --git a/alsa_settings/MTLP_RVP_SDW.sh b/alsa_settings/MTLP_RVP_SDW.sh index 0e543642..0bfc4778 100755 --- a/alsa_settings/MTLP_RVP_SDW.sh +++ b/alsa_settings/MTLP_RVP_SDW.sh @@ -1,8 +1,10 @@ set -e -# enable playback +# enable headset playback amixer -c sofsoundwire cset name='Headphone Switch' on amixer -c sofsoundwire cset name='rt711 FU05 Playback Volume' 60 -amixer -c sofsoundwire cset name='gain.1.1 1 Playback Volume 0' 45 -amixer -c sofsoundwire cset name='gain.2.1 2 Main Playback Volume' 45 -amixer -c sofsoundwire cset name='gain.5.1 5 2nd Playback Volume' 45 + +# enable headset capture +amixer -c sofsoundwire cset name='Headset Mic Switch' on +amixer -c sofsoundwire cset name='rt711 ADC 08 Capture Switch' on +amixer -c sofsoundwire cset name='rt711 ADC 08 Capture Volume' 25 diff --git a/alsa_settings/TGLU_RVP_SDW_IPC4ZPH.sh b/alsa_settings/TGLU_RVP_SDW_IPC4ZPH.sh new file mode 100755 index 00000000..5438a3a3 --- /dev/null +++ b/alsa_settings/TGLU_RVP_SDW_IPC4ZPH.sh @@ -0,0 +1,10 @@ +set -e + +# enable headset playback +amixer -c sofsoundwire cset name='Headphone Switch' on +amixer -c sofsoundwire cset name='rt711 DAC Surr Playback Volume' 55 + +# enable headset capture +amixer -c sofsoundwire cset name='Headset Mic Switch' on +amixer -c sofsoundwire cset name='rt711 ADC 08 Capture Switch' on +amixer -c sofsoundwire cset name='rt711 ADC 08 Capture Volume' 25 diff --git a/alsa_settings/TGLU_UP_HDA_IPC4ZPH.sh b/alsa_settings/TGLU_UP_HDA_IPC4ZPH.sh new file mode 100755 index 00000000..d8d438a9 --- /dev/null +++ b/alsa_settings/TGLU_UP_HDA_IPC4ZPH.sh @@ -0,0 +1,9 @@ +set -e + +# enable headset playback +amixer -c sofhdadsp cset name='Master Playback Switch' on +amixer -c sofhdadsp cset name='Master Playback Volume' 45 + +# enable headset capture +amixer -c sofhdadsp cset name='Capture Switch' on +amixer -c sofhdadsp cset name='Capture Volume' 30 From a6520b0b210e1d857c065ecc548a89931446c375 Mon Sep 17 00:00:00 2001 From: Keqiao Zhang Date: Thu, 16 Mar 2023 10:09:00 +0800 Subject: [PATCH 2/2] lib.sh: switch to use reset_sof_volume funtion to adjust amixer settings for IPC4 nocodec platforms Signed-off-by: Keqiao Zhang --- case-lib/lib.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/case-lib/lib.sh b/case-lib/lib.sh index f6a63410..5be8562e 100644 --- a/case-lib/lib.sh +++ b/case-lib/lib.sh @@ -808,7 +808,7 @@ set_alsa_settings() local PNAME="${1%_ZEPHYR}" dlogi "Run alsa setting for $PNAME" case $PNAME in - APL_UP2_NOCODEC | CML_RVP_NOCODEC | JSL_RVP_NOCODEC | TGLU_RVP_NOCODEC | ADLP_RVP_NOCODEC | TGLH_RVP_NOCODEC | MTLP_RVP_NOCODEC) + APL_UP2_NOCODEC | CML_RVP_NOCODEC | JSL_RVP_NOCODEC | TGLU_RVP_NOCODEC | ADLP_RVP_NOCODEC | TGLH_RVP_NOCODEC) # common nocodec alsa settings "$SCRIPT_HOME"/alsa_settings/CAVS_NOCODEC.sh ;; @@ -816,6 +816,9 @@ set_alsa_settings() # common nocodec_ci alsa settings "$SCRIPT_HOME"/alsa_settings/CAVS_NOCODEC_CI.sh ;; + TGLU_RVP_NOCODEC_IPC4ZPH | ADLP_RVP_NOCODEC_IPC4ZPH | MTLP_RVP_NOCODEC) + dlogi "Use reset_sof_volume function to set amixer setting." + ;; *) # if script name is same as platform name, default case will handle all if [ -f "$SCRIPT_HOME"/alsa_settings/"$PNAME".sh ]; then