Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Switching between audio outputs devices?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

[Solved] Switching between audio outputs devices?

#1 Post by bester69 »

hi

Ive this two audio cards and Im using pavucontrol to turn on/off between both of them,
Image

how can I do this with a command line??, thanks a lot
Last edited by bester69 on 2021-03-01 18:03, edited 1 time in total.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Switching between audio outputs devices?

#2 Post by Head_on_a_Stick »

deadbang

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Switching between audio outputs devices?

#3 Post by bester69 »

ok, thanks a lot Head :o

pacmdswitch.sh

Code: Select all

#!/bin/bash
#
pacmdstate="/home/user/.cache/pacmdstate.txt"
touch $pacmdstate
A=$(cat $pacmdstate)

if [ "$A" == "0" ]
then
pacmd set-card-profile 0 off
pacmd set-card-profile 1 output:analog-stereo
echo "1" > "$pacmdstate"
    else
pacmd set-card-profile 0  output:analog-stereo+input:analog-stereo
echo "0" > "$pacmdstate"
fi
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

Post Reply