Skip to content

Commit

Permalink
Add Z2E_SPEAKERS2 to audioconf
Browse files Browse the repository at this point in the history
  • Loading branch information
AgenttiX committed Jan 3, 2024
1 parent 1433f23 commit cc17fc2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zsh/custom/audio.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ audioconf() {
local Z2E_HDMI="alsa_output.pci-0000_01_00.1.hdmi-surround-extra1.2"
local Z2E_OPTICAL="alsa_output.usb-Generic_USB_Audio-00.2.iec958-ac3-surround-51"
local Z2E_SPEAKERS="alsa_output.usb-Generic_USB_Audio-00.analog-surround-51"
local Z2E_SPEAKERS2="alsa_output.usb-Generic_USB_Audio-00.2.analog-surround-51"

local DEV_ID
local NODES
Expand Down Expand Up @@ -81,6 +82,10 @@ audioconf() {
DEV_ID="$(pipewire_id "${Z2E_SPEAKERS}")"
wpctl set-default "${DEV_ID}"
wpctl set-volume "${DEV_ID}" 1
elif grep -q "${Z2E_SPEAKERS2}" <<< "${NODES}"; then
DEV_ID="$(pipewire_id "${Z2E_SPEAKERS2}")"
wpctl set-default "${DEV_ID}"
wpctl set-volume "${DEV_ID}" 1
elif grep -q "${T480_SPEAKERS}" <<< "${NODES}"; then
wpctl set-default "$(pipewire_id "${T480_SPEAKERS}")"
else
Expand Down

0 comments on commit cc17fc2

Please sign in to comment.