How can I enforce an audio profile?












7















The settings menu provides me a choice between "Headset Head Unit (HSP/HFP)" and "High Fidelity Playback (A2DP Sink)" on my Bluetooth headphones. The former produces horrible sound quality, so I always set the profile to the latter, but some applications seem to set the profile to Headset Head Unit. For example, if I open TeamSpeak. I can open the settings menu and set the profile back to A2DP without issue, but is there a way I can force it to stay on the mode I select? Additionally, when I turn on my headphones, they often connect to the HSP/HFP profile. Is there a way I can make it remember my profile choice?



Note: My question doesn't pertain to changing the profile via the CLI, but rather how to make sure the profile I pick (via either GUI or CLI) is not overridden by applications, and is not reset on restarting my earphones.










share|improve this question




















  • 3





    Possible duplicate of How do I switch the audio outputs of an audio device from CLI? I'm not sure the suggestion is exact duplication but it might help.

    – pa4080
    Feb 1 at 14:38








  • 1





    I deleted my answer because I think I was wrong about pavucontrol, sorry.

    – Kristopher Ives
    Feb 1 at 16:46
















7















The settings menu provides me a choice between "Headset Head Unit (HSP/HFP)" and "High Fidelity Playback (A2DP Sink)" on my Bluetooth headphones. The former produces horrible sound quality, so I always set the profile to the latter, but some applications seem to set the profile to Headset Head Unit. For example, if I open TeamSpeak. I can open the settings menu and set the profile back to A2DP without issue, but is there a way I can force it to stay on the mode I select? Additionally, when I turn on my headphones, they often connect to the HSP/HFP profile. Is there a way I can make it remember my profile choice?



Note: My question doesn't pertain to changing the profile via the CLI, but rather how to make sure the profile I pick (via either GUI or CLI) is not overridden by applications, and is not reset on restarting my earphones.










share|improve this question




















  • 3





    Possible duplicate of How do I switch the audio outputs of an audio device from CLI? I'm not sure the suggestion is exact duplication but it might help.

    – pa4080
    Feb 1 at 14:38








  • 1





    I deleted my answer because I think I was wrong about pavucontrol, sorry.

    – Kristopher Ives
    Feb 1 at 16:46














7












7








7








The settings menu provides me a choice between "Headset Head Unit (HSP/HFP)" and "High Fidelity Playback (A2DP Sink)" on my Bluetooth headphones. The former produces horrible sound quality, so I always set the profile to the latter, but some applications seem to set the profile to Headset Head Unit. For example, if I open TeamSpeak. I can open the settings menu and set the profile back to A2DP without issue, but is there a way I can force it to stay on the mode I select? Additionally, when I turn on my headphones, they often connect to the HSP/HFP profile. Is there a way I can make it remember my profile choice?



Note: My question doesn't pertain to changing the profile via the CLI, but rather how to make sure the profile I pick (via either GUI or CLI) is not overridden by applications, and is not reset on restarting my earphones.










share|improve this question
















The settings menu provides me a choice between "Headset Head Unit (HSP/HFP)" and "High Fidelity Playback (A2DP Sink)" on my Bluetooth headphones. The former produces horrible sound quality, so I always set the profile to the latter, but some applications seem to set the profile to Headset Head Unit. For example, if I open TeamSpeak. I can open the settings menu and set the profile back to A2DP without issue, but is there a way I can force it to stay on the mode I select? Additionally, when I turn on my headphones, they often connect to the HSP/HFP profile. Is there a way I can make it remember my profile choice?



Note: My question doesn't pertain to changing the profile via the CLI, but rather how to make sure the profile I pick (via either GUI or CLI) is not overridden by applications, and is not reset on restarting my earphones.







sound headphones system-settings






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 12 at 2:21







VortixDev

















asked Feb 1 at 14:28









VortixDevVortixDev

1038




1038








  • 3





    Possible duplicate of How do I switch the audio outputs of an audio device from CLI? I'm not sure the suggestion is exact duplication but it might help.

    – pa4080
    Feb 1 at 14:38








  • 1





    I deleted my answer because I think I was wrong about pavucontrol, sorry.

    – Kristopher Ives
    Feb 1 at 16:46














  • 3





    Possible duplicate of How do I switch the audio outputs of an audio device from CLI? I'm not sure the suggestion is exact duplication but it might help.

    – pa4080
    Feb 1 at 14:38








  • 1





    I deleted my answer because I think I was wrong about pavucontrol, sorry.

    – Kristopher Ives
    Feb 1 at 16:46








3




3





Possible duplicate of How do I switch the audio outputs of an audio device from CLI? I'm not sure the suggestion is exact duplication but it might help.

– pa4080
Feb 1 at 14:38







Possible duplicate of How do I switch the audio outputs of an audio device from CLI? I'm not sure the suggestion is exact duplication but it might help.

– pa4080
Feb 1 at 14:38






1




1





I deleted my answer because I think I was wrong about pavucontrol, sorry.

– Kristopher Ives
Feb 1 at 16:46





I deleted my answer because I think I was wrong about pavucontrol, sorry.

– Kristopher Ives
Feb 1 at 16:46










1 Answer
1






active

oldest

votes


















0














The observed profile switching seems to be a feature of PulseAudio 10.0 and above, mentioned in the release notes as "Automatically switch Bluetooth profile when using VoIP applications". To summarise, if A2DP is used, PulseAudio will switch to HFP when an application uses the microphone. This is necessary because A2DP cannot support simultaneous input and output, whereas HFP does.



The following bug reports have more information on the issue:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/508522
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1711087



To resolve the problem, you can either edit /etc/pulse/default.pa or ~/.config/default.pa, based on your preference. If you decide to use the user configuration file, you may have to create it by copying /etc/pulse/default.pa. Once you've decided which file you want to edit, find the following line:



load-module module-bluetooth-policy


... and replace it with the following:



load-module module-bluetooth-policy auto_switch=false


The added parameter will stop PulseAudio from performing the profile switching.



I will leave the question open, as this answer doesn't specifically address the issue of enforcing a profile. It does, however, address the cause of switching that I was facing, and hopefully someone else will find it useful.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1114750%2fhow-can-i-enforce-an-audio-profile%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    The observed profile switching seems to be a feature of PulseAudio 10.0 and above, mentioned in the release notes as "Automatically switch Bluetooth profile when using VoIP applications". To summarise, if A2DP is used, PulseAudio will switch to HFP when an application uses the microphone. This is necessary because A2DP cannot support simultaneous input and output, whereas HFP does.



    The following bug reports have more information on the issue:
    https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/508522
    https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1711087



    To resolve the problem, you can either edit /etc/pulse/default.pa or ~/.config/default.pa, based on your preference. If you decide to use the user configuration file, you may have to create it by copying /etc/pulse/default.pa. Once you've decided which file you want to edit, find the following line:



    load-module module-bluetooth-policy


    ... and replace it with the following:



    load-module module-bluetooth-policy auto_switch=false


    The added parameter will stop PulseAudio from performing the profile switching.



    I will leave the question open, as this answer doesn't specifically address the issue of enforcing a profile. It does, however, address the cause of switching that I was facing, and hopefully someone else will find it useful.






    share|improve this answer




























      0














      The observed profile switching seems to be a feature of PulseAudio 10.0 and above, mentioned in the release notes as "Automatically switch Bluetooth profile when using VoIP applications". To summarise, if A2DP is used, PulseAudio will switch to HFP when an application uses the microphone. This is necessary because A2DP cannot support simultaneous input and output, whereas HFP does.



      The following bug reports have more information on the issue:
      https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/508522
      https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1711087



      To resolve the problem, you can either edit /etc/pulse/default.pa or ~/.config/default.pa, based on your preference. If you decide to use the user configuration file, you may have to create it by copying /etc/pulse/default.pa. Once you've decided which file you want to edit, find the following line:



      load-module module-bluetooth-policy


      ... and replace it with the following:



      load-module module-bluetooth-policy auto_switch=false


      The added parameter will stop PulseAudio from performing the profile switching.



      I will leave the question open, as this answer doesn't specifically address the issue of enforcing a profile. It does, however, address the cause of switching that I was facing, and hopefully someone else will find it useful.






      share|improve this answer


























        0












        0








        0







        The observed profile switching seems to be a feature of PulseAudio 10.0 and above, mentioned in the release notes as "Automatically switch Bluetooth profile when using VoIP applications". To summarise, if A2DP is used, PulseAudio will switch to HFP when an application uses the microphone. This is necessary because A2DP cannot support simultaneous input and output, whereas HFP does.



        The following bug reports have more information on the issue:
        https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/508522
        https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1711087



        To resolve the problem, you can either edit /etc/pulse/default.pa or ~/.config/default.pa, based on your preference. If you decide to use the user configuration file, you may have to create it by copying /etc/pulse/default.pa. Once you've decided which file you want to edit, find the following line:



        load-module module-bluetooth-policy


        ... and replace it with the following:



        load-module module-bluetooth-policy auto_switch=false


        The added parameter will stop PulseAudio from performing the profile switching.



        I will leave the question open, as this answer doesn't specifically address the issue of enforcing a profile. It does, however, address the cause of switching that I was facing, and hopefully someone else will find it useful.






        share|improve this answer













        The observed profile switching seems to be a feature of PulseAudio 10.0 and above, mentioned in the release notes as "Automatically switch Bluetooth profile when using VoIP applications". To summarise, if A2DP is used, PulseAudio will switch to HFP when an application uses the microphone. This is necessary because A2DP cannot support simultaneous input and output, whereas HFP does.



        The following bug reports have more information on the issue:
        https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/508522
        https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1711087



        To resolve the problem, you can either edit /etc/pulse/default.pa or ~/.config/default.pa, based on your preference. If you decide to use the user configuration file, you may have to create it by copying /etc/pulse/default.pa. Once you've decided which file you want to edit, find the following line:



        load-module module-bluetooth-policy


        ... and replace it with the following:



        load-module module-bluetooth-policy auto_switch=false


        The added parameter will stop PulseAudio from performing the profile switching.



        I will leave the question open, as this answer doesn't specifically address the issue of enforcing a profile. It does, however, address the cause of switching that I was facing, and hopefully someone else will find it useful.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 1 at 22:35









        VortixDevVortixDev

        1038




        1038






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1114750%2fhow-can-i-enforce-an-audio-profile%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Questions related to Moebius Transform of Characteristic Function of the Primes

            List of scandals in India

            Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?