Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amixer setting for ipc4 platforms #1012

Merged
merged 2 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions alsa_settings/ADLP_RVP_SDW_IPC4ZPH.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions alsa_settings/MTLP_RVP_HDA.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 6 additions & 4 deletions alsa_settings/MTLP_RVP_SDW.sh
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions alsa_settings/TGLU_RVP_SDW_IPC4ZPH.sh
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions alsa_settings/TGLU_UP_HDA_IPC4ZPH.sh
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -808,14 +808,17 @@ 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
;;
TGLU_RVP_NOCODEC_CI | ADLP_RVP_NOCODEC_CI)
# 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
Expand Down