Pulseaudio mute device

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I have an Notebook runnning Pulseaudio on an Arch Linux. This notebook is used at home in an docking station. On this one are loudspeakers connected. But sometimes I do use headphones.
How can I automatically mute the speakers and just use the headphones?



Here is the real issue:
Both jack connectors work on the same audio device.



# pacmd list-sinks 
1 sink(s) available.
* index: 1
...


I already figured out, that when I use pulseaudio in verbose mode, booth devices are recognized accordingly to their location:



D: [pulseaudio] module-alsa-card.c: Jack 'Headphone Jack' is now unplugged
D: [pulseaudio] device-port.c: Setting port analog-output-speaker to status unknown
...
D: [pulseaudio] module-alsa-card.c: Jack 'Dock Headphone Jack' is now plugged in
...


Do you have any idea how I can use this information to automaticaly mute the loudspeakers?



Thanks in advance..










share|improve this question

























    up vote
    2
    down vote

    favorite












    I have an Notebook runnning Pulseaudio on an Arch Linux. This notebook is used at home in an docking station. On this one are loudspeakers connected. But sometimes I do use headphones.
    How can I automatically mute the speakers and just use the headphones?



    Here is the real issue:
    Both jack connectors work on the same audio device.



    # pacmd list-sinks 
    1 sink(s) available.
    * index: 1
    ...


    I already figured out, that when I use pulseaudio in verbose mode, booth devices are recognized accordingly to their location:



    D: [pulseaudio] module-alsa-card.c: Jack 'Headphone Jack' is now unplugged
    D: [pulseaudio] device-port.c: Setting port analog-output-speaker to status unknown
    ...
    D: [pulseaudio] module-alsa-card.c: Jack 'Dock Headphone Jack' is now plugged in
    ...


    Do you have any idea how I can use this information to automaticaly mute the loudspeakers?



    Thanks in advance..










    share|improve this question























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I have an Notebook runnning Pulseaudio on an Arch Linux. This notebook is used at home in an docking station. On this one are loudspeakers connected. But sometimes I do use headphones.
      How can I automatically mute the speakers and just use the headphones?



      Here is the real issue:
      Both jack connectors work on the same audio device.



      # pacmd list-sinks 
      1 sink(s) available.
      * index: 1
      ...


      I already figured out, that when I use pulseaudio in verbose mode, booth devices are recognized accordingly to their location:



      D: [pulseaudio] module-alsa-card.c: Jack 'Headphone Jack' is now unplugged
      D: [pulseaudio] device-port.c: Setting port analog-output-speaker to status unknown
      ...
      D: [pulseaudio] module-alsa-card.c: Jack 'Dock Headphone Jack' is now plugged in
      ...


      Do you have any idea how I can use this information to automaticaly mute the loudspeakers?



      Thanks in advance..










      share|improve this question













      I have an Notebook runnning Pulseaudio on an Arch Linux. This notebook is used at home in an docking station. On this one are loudspeakers connected. But sometimes I do use headphones.
      How can I automatically mute the speakers and just use the headphones?



      Here is the real issue:
      Both jack connectors work on the same audio device.



      # pacmd list-sinks 
      1 sink(s) available.
      * index: 1
      ...


      I already figured out, that when I use pulseaudio in verbose mode, booth devices are recognized accordingly to their location:



      D: [pulseaudio] module-alsa-card.c: Jack 'Headphone Jack' is now unplugged
      D: [pulseaudio] device-port.c: Setting port analog-output-speaker to status unknown
      ...
      D: [pulseaudio] module-alsa-card.c: Jack 'Dock Headphone Jack' is now plugged in
      ...


      Do you have any idea how I can use this information to automaticaly mute the loudspeakers?



      Thanks in advance..







      audio pulseaudio






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 10 '17 at 20:19









      Martin

      134




      134

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f397298%2fpulseaudio-mute-device%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f397298%2fpulseaudio-mute-device%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)