Skip to content

Commit

Permalink
feat(sound-levels-maintainer): add galaxy buds FE mic
Browse files Browse the repository at this point in the history
  • Loading branch information
workflow committed Dec 9, 2024
1 parent f40e7c4 commit 1d98f72
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,23 @@ get_pipewire_node_id() {
OBS_SPEAKER_ID=$(get_pipewire_node_id "ObsSpeaker")
OBS_MIC_ID=$(get_pipewire_node_id "ObsMic")
INTERNAL_MIC_ID=$(get_pipewire_node_id "alsa_input.pci-0000_00_1f.3-platform-sof_sdw.HiFi__hw_sofsoundwire_4__source")
BUDS_FE_MIC_ID=$(get_pipewire_node_id "bluez_input_internal.34_E3_FB_C5_01_E0.0")

wpctl set-volume "$OBS_SPEAKER_ID" 1.0
wpctl set-volume "$OBS_MIC_ID" 1.0
wpctl set-volume "$INTERNAL_MIC_ID" 2.0
wpctl set-volume "$BUDS_FE_MIC_ID" 0.9

while true; do
current_volume_obs_speaker=$(wpctl get-volume "$OBS_SPEAKER_ID" | awk '{print $2}')
current_volume_obs_mic=$(wpctl get-volume "$OBS_MIC_ID" | awk '{print $2}')
current_volume_internal_mic=$(wpctl get-volume "$INTERNAL_MIC_ID" | awk '{print $2}')
current_volume_buds_fe_mic=$(wpctl get-volume "$BUDS_FE_MIC_ID" | awk '{print $2}')

[ "$current_volume_obs_speaker" != "1.0" ] && wpctl set-volume "$OBS_SPEAKER_ID" 1.0
[ "$current_volume_obs_mic" != "1.0" ] && wpctl set-volume "$OBS_MIC_ID" 1.0
[ "$current_volume_internal_mic" != "2.0" ] && wpctl set-volume "$INTERNAL_MIC_ID" 2.0
[ "$current_volume_buds_fe_mic" != "0.9" ] && wpctl set-volume "$BUDS_FE_MIC_ID" 0.9

sleep 1
done

0 comments on commit 1d98f72

Please sign in to comment.