Alsa: snd-aloop is creating surround sound devices

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











up vote
1
down vote

favorite












I need to create two ALSA loopback interfaces to link two applications.



I have the following in /etc/modprobe.d/sound.conf -



alias snd-card-1 snd-aloop
options snd-aloop pcm_substreams=2,2 id=1,2 enable=1,1 index=10,11


This creates the loopbacks and it's working, but it also creates loads of surround sound interfaces that I do not require. Example below-



surround51:CARD=D2,DEV=0
Loopback, Loopback PCM
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=D2,DEV=0
Loopback, Loopback PCM
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers


Is there anyway I can create loopback devices for Stereo only?



Thanks







share|improve this question
























    up vote
    1
    down vote

    favorite












    I need to create two ALSA loopback interfaces to link two applications.



    I have the following in /etc/modprobe.d/sound.conf -



    alias snd-card-1 snd-aloop
    options snd-aloop pcm_substreams=2,2 id=1,2 enable=1,1 index=10,11


    This creates the loopbacks and it's working, but it also creates loads of surround sound interfaces that I do not require. Example below-



    surround51:CARD=D2,DEV=0
    Loopback, Loopback PCM
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    surround71:CARD=D2,DEV=0
    Loopback, Loopback PCM
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers


    Is there anyway I can create loopback devices for Stereo only?



    Thanks







    share|improve this question






















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I need to create two ALSA loopback interfaces to link two applications.



      I have the following in /etc/modprobe.d/sound.conf -



      alias snd-card-1 snd-aloop
      options snd-aloop pcm_substreams=2,2 id=1,2 enable=1,1 index=10,11


      This creates the loopbacks and it's working, but it also creates loads of surround sound interfaces that I do not require. Example below-



      surround51:CARD=D2,DEV=0
      Loopback, Loopback PCM
      5.1 Surround output to Front, Center, Rear and Subwoofer speakers
      surround71:CARD=D2,DEV=0
      Loopback, Loopback PCM
      7.1 Surround output to Front, Center, Side, Rear and Woofer speakers


      Is there anyway I can create loopback devices for Stereo only?



      Thanks







      share|improve this question












      I need to create two ALSA loopback interfaces to link two applications.



      I have the following in /etc/modprobe.d/sound.conf -



      alias snd-card-1 snd-aloop
      options snd-aloop pcm_substreams=2,2 id=1,2 enable=1,1 index=10,11


      This creates the loopbacks and it's working, but it also creates loads of surround sound interfaces that I do not require. Example below-



      surround51:CARD=D2,DEV=0
      Loopback, Loopback PCM
      5.1 Surround output to Front, Center, Rear and Subwoofer speakers
      surround71:CARD=D2,DEV=0
      Loopback, Loopback PCM
      7.1 Surround output to Front, Center, Side, Rear and Woofer speakers


      Is there anyway I can create loopback devices for Stereo only?



      Thanks









      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 16 at 13:45









      marrold

      162




      162




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          I discovered there were configuration files in:



          /usr/share/alsa/pcm


          That were creating the surround sound interfaces. I deleted the files, and the interfaces are no longer created.






          share|improve this answer




















          • Note that those are the standard configuration files that manage creation of an "additional" layer in ALSA on top of the hardware interfaces. And that means all interfaces, not only the loopback one. And even if you don't need them, some applications may, and keeping them does no harm. Also, I consider snd-aloop one of the most painful ways to get a loopback function, and I'd use it only if it's an ALSA-only system (which most systems today are not).
            – dirkt
            Mar 17 at 6:42










          • I'm open to other suggestions and indeed got it working with pulseaudio, but one of the applications I am linking only supports ALSA.
            – marrold
            Mar 17 at 8:23










          • It's fairly easy with Pulseaudio (just attach the recording application to the monitor source of the sink of the playback application). In principle, all ALSA applications should be able to use Pulseaudio via the pulse audio device, which you should configure as default ALSA device. Anything particular about your application so it doesn't work this way?
            – dirkt
            Mar 17 at 8:30










          • It may well work, but I've found it hard work to find good documentation on doing it. I need two separate loops if that's worth noting. I have experience using Linux, but having to mess around with sound is new to me
            – marrold
            Mar 17 at 8:34


















          up vote
          0
          down vote













          Alternative with Pulseaudio:



          To make one application under Pulseaudio record the output of another application is fairly easy:



          Pulseaudio has the concept of sound sources and sound sinks. You can arbitrarily connect up application to those. Pulseaudio has modules to remember those connections, and will restore the connection sthe next time the application is restarted (if the connection is possible). Otherwise Pulseaudio will choose default connections for you.



          You can inspect and change all this using the pavucontrol GUI, which also allows you to change volume controls both on the connection between application and source/sink, and the source/sink itself.



          The basic use case four source/sinks is to represent hardware recording and playback. But it's not limited to that: There are various ways to create other kinds of sources and sinks. In particular, each sink has connected to it a .monitor source, which just loopbacks. Actually pavucontrol uses those to implement the sound metering display.



          So settung up two loops, are even 100 loops, or tee-shaped connections with several applications listening to one application is all really straightforward.



          If the GUI is not enough for you, there are also commandline applications pacmd and pactl, that allow scripting. See pacmd help or pactl help for details. (I've no idea why there are two of them...). However, their output is not particularly easy to parse, and needs a bit of fiddling with grep -A etc.



          Pulseaudio includes a compatibility layer to allow all ALSA applications to use Pulseaudio, via the pulse ALSA device.
          If you have an .asoundrc like



          pcm.!default pulse
          ctl.!default pulse


          then every ALSA application will use Pulseaudio by default (unless you configure it to use a different ALSA device). Some ALSA applications think they need to use hw:... (which is bad design), and you've to convice those applications to use default instead. A few ALSA applications try to do things that only work on hw:..., and these will cause problems, but they are rare.



          Bottom line: Routing sound is a lot easier with Pulseaudio (or with Jack) than with ALSA directly.






          share|improve this answer




















            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%2f430629%2falsa-snd-aloop-is-creating-surround-sound-devices%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            I discovered there were configuration files in:



            /usr/share/alsa/pcm


            That were creating the surround sound interfaces. I deleted the files, and the interfaces are no longer created.






            share|improve this answer




















            • Note that those are the standard configuration files that manage creation of an "additional" layer in ALSA on top of the hardware interfaces. And that means all interfaces, not only the loopback one. And even if you don't need them, some applications may, and keeping them does no harm. Also, I consider snd-aloop one of the most painful ways to get a loopback function, and I'd use it only if it's an ALSA-only system (which most systems today are not).
              – dirkt
              Mar 17 at 6:42










            • I'm open to other suggestions and indeed got it working with pulseaudio, but one of the applications I am linking only supports ALSA.
              – marrold
              Mar 17 at 8:23










            • It's fairly easy with Pulseaudio (just attach the recording application to the monitor source of the sink of the playback application). In principle, all ALSA applications should be able to use Pulseaudio via the pulse audio device, which you should configure as default ALSA device. Anything particular about your application so it doesn't work this way?
              – dirkt
              Mar 17 at 8:30










            • It may well work, but I've found it hard work to find good documentation on doing it. I need two separate loops if that's worth noting. I have experience using Linux, but having to mess around with sound is new to me
              – marrold
              Mar 17 at 8:34















            up vote
            1
            down vote













            I discovered there were configuration files in:



            /usr/share/alsa/pcm


            That were creating the surround sound interfaces. I deleted the files, and the interfaces are no longer created.






            share|improve this answer




















            • Note that those are the standard configuration files that manage creation of an "additional" layer in ALSA on top of the hardware interfaces. And that means all interfaces, not only the loopback one. And even if you don't need them, some applications may, and keeping them does no harm. Also, I consider snd-aloop one of the most painful ways to get a loopback function, and I'd use it only if it's an ALSA-only system (which most systems today are not).
              – dirkt
              Mar 17 at 6:42










            • I'm open to other suggestions and indeed got it working with pulseaudio, but one of the applications I am linking only supports ALSA.
              – marrold
              Mar 17 at 8:23










            • It's fairly easy with Pulseaudio (just attach the recording application to the monitor source of the sink of the playback application). In principle, all ALSA applications should be able to use Pulseaudio via the pulse audio device, which you should configure as default ALSA device. Anything particular about your application so it doesn't work this way?
              – dirkt
              Mar 17 at 8:30










            • It may well work, but I've found it hard work to find good documentation on doing it. I need two separate loops if that's worth noting. I have experience using Linux, but having to mess around with sound is new to me
              – marrold
              Mar 17 at 8:34













            up vote
            1
            down vote










            up vote
            1
            down vote









            I discovered there were configuration files in:



            /usr/share/alsa/pcm


            That were creating the surround sound interfaces. I deleted the files, and the interfaces are no longer created.






            share|improve this answer












            I discovered there were configuration files in:



            /usr/share/alsa/pcm


            That were creating the surround sound interfaces. I deleted the files, and the interfaces are no longer created.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 17 at 1:50









            marrold

            162




            162











            • Note that those are the standard configuration files that manage creation of an "additional" layer in ALSA on top of the hardware interfaces. And that means all interfaces, not only the loopback one. And even if you don't need them, some applications may, and keeping them does no harm. Also, I consider snd-aloop one of the most painful ways to get a loopback function, and I'd use it only if it's an ALSA-only system (which most systems today are not).
              – dirkt
              Mar 17 at 6:42










            • I'm open to other suggestions and indeed got it working with pulseaudio, but one of the applications I am linking only supports ALSA.
              – marrold
              Mar 17 at 8:23










            • It's fairly easy with Pulseaudio (just attach the recording application to the monitor source of the sink of the playback application). In principle, all ALSA applications should be able to use Pulseaudio via the pulse audio device, which you should configure as default ALSA device. Anything particular about your application so it doesn't work this way?
              – dirkt
              Mar 17 at 8:30










            • It may well work, but I've found it hard work to find good documentation on doing it. I need two separate loops if that's worth noting. I have experience using Linux, but having to mess around with sound is new to me
              – marrold
              Mar 17 at 8:34

















            • Note that those are the standard configuration files that manage creation of an "additional" layer in ALSA on top of the hardware interfaces. And that means all interfaces, not only the loopback one. And even if you don't need them, some applications may, and keeping them does no harm. Also, I consider snd-aloop one of the most painful ways to get a loopback function, and I'd use it only if it's an ALSA-only system (which most systems today are not).
              – dirkt
              Mar 17 at 6:42










            • I'm open to other suggestions and indeed got it working with pulseaudio, but one of the applications I am linking only supports ALSA.
              – marrold
              Mar 17 at 8:23










            • It's fairly easy with Pulseaudio (just attach the recording application to the monitor source of the sink of the playback application). In principle, all ALSA applications should be able to use Pulseaudio via the pulse audio device, which you should configure as default ALSA device. Anything particular about your application so it doesn't work this way?
              – dirkt
              Mar 17 at 8:30










            • It may well work, but I've found it hard work to find good documentation on doing it. I need two separate loops if that's worth noting. I have experience using Linux, but having to mess around with sound is new to me
              – marrold
              Mar 17 at 8:34
















            Note that those are the standard configuration files that manage creation of an "additional" layer in ALSA on top of the hardware interfaces. And that means all interfaces, not only the loopback one. And even if you don't need them, some applications may, and keeping them does no harm. Also, I consider snd-aloop one of the most painful ways to get a loopback function, and I'd use it only if it's an ALSA-only system (which most systems today are not).
            – dirkt
            Mar 17 at 6:42




            Note that those are the standard configuration files that manage creation of an "additional" layer in ALSA on top of the hardware interfaces. And that means all interfaces, not only the loopback one. And even if you don't need them, some applications may, and keeping them does no harm. Also, I consider snd-aloop one of the most painful ways to get a loopback function, and I'd use it only if it's an ALSA-only system (which most systems today are not).
            – dirkt
            Mar 17 at 6:42












            I'm open to other suggestions and indeed got it working with pulseaudio, but one of the applications I am linking only supports ALSA.
            – marrold
            Mar 17 at 8:23




            I'm open to other suggestions and indeed got it working with pulseaudio, but one of the applications I am linking only supports ALSA.
            – marrold
            Mar 17 at 8:23












            It's fairly easy with Pulseaudio (just attach the recording application to the monitor source of the sink of the playback application). In principle, all ALSA applications should be able to use Pulseaudio via the pulse audio device, which you should configure as default ALSA device. Anything particular about your application so it doesn't work this way?
            – dirkt
            Mar 17 at 8:30




            It's fairly easy with Pulseaudio (just attach the recording application to the monitor source of the sink of the playback application). In principle, all ALSA applications should be able to use Pulseaudio via the pulse audio device, which you should configure as default ALSA device. Anything particular about your application so it doesn't work this way?
            – dirkt
            Mar 17 at 8:30












            It may well work, but I've found it hard work to find good documentation on doing it. I need two separate loops if that's worth noting. I have experience using Linux, but having to mess around with sound is new to me
            – marrold
            Mar 17 at 8:34





            It may well work, but I've found it hard work to find good documentation on doing it. I need two separate loops if that's worth noting. I have experience using Linux, but having to mess around with sound is new to me
            – marrold
            Mar 17 at 8:34













            up vote
            0
            down vote













            Alternative with Pulseaudio:



            To make one application under Pulseaudio record the output of another application is fairly easy:



            Pulseaudio has the concept of sound sources and sound sinks. You can arbitrarily connect up application to those. Pulseaudio has modules to remember those connections, and will restore the connection sthe next time the application is restarted (if the connection is possible). Otherwise Pulseaudio will choose default connections for you.



            You can inspect and change all this using the pavucontrol GUI, which also allows you to change volume controls both on the connection between application and source/sink, and the source/sink itself.



            The basic use case four source/sinks is to represent hardware recording and playback. But it's not limited to that: There are various ways to create other kinds of sources and sinks. In particular, each sink has connected to it a .monitor source, which just loopbacks. Actually pavucontrol uses those to implement the sound metering display.



            So settung up two loops, are even 100 loops, or tee-shaped connections with several applications listening to one application is all really straightforward.



            If the GUI is not enough for you, there are also commandline applications pacmd and pactl, that allow scripting. See pacmd help or pactl help for details. (I've no idea why there are two of them...). However, their output is not particularly easy to parse, and needs a bit of fiddling with grep -A etc.



            Pulseaudio includes a compatibility layer to allow all ALSA applications to use Pulseaudio, via the pulse ALSA device.
            If you have an .asoundrc like



            pcm.!default pulse
            ctl.!default pulse


            then every ALSA application will use Pulseaudio by default (unless you configure it to use a different ALSA device). Some ALSA applications think they need to use hw:... (which is bad design), and you've to convice those applications to use default instead. A few ALSA applications try to do things that only work on hw:..., and these will cause problems, but they are rare.



            Bottom line: Routing sound is a lot easier with Pulseaudio (or with Jack) than with ALSA directly.






            share|improve this answer
























              up vote
              0
              down vote













              Alternative with Pulseaudio:



              To make one application under Pulseaudio record the output of another application is fairly easy:



              Pulseaudio has the concept of sound sources and sound sinks. You can arbitrarily connect up application to those. Pulseaudio has modules to remember those connections, and will restore the connection sthe next time the application is restarted (if the connection is possible). Otherwise Pulseaudio will choose default connections for you.



              You can inspect and change all this using the pavucontrol GUI, which also allows you to change volume controls both on the connection between application and source/sink, and the source/sink itself.



              The basic use case four source/sinks is to represent hardware recording and playback. But it's not limited to that: There are various ways to create other kinds of sources and sinks. In particular, each sink has connected to it a .monitor source, which just loopbacks. Actually pavucontrol uses those to implement the sound metering display.



              So settung up two loops, are even 100 loops, or tee-shaped connections with several applications listening to one application is all really straightforward.



              If the GUI is not enough for you, there are also commandline applications pacmd and pactl, that allow scripting. See pacmd help or pactl help for details. (I've no idea why there are two of them...). However, their output is not particularly easy to parse, and needs a bit of fiddling with grep -A etc.



              Pulseaudio includes a compatibility layer to allow all ALSA applications to use Pulseaudio, via the pulse ALSA device.
              If you have an .asoundrc like



              pcm.!default pulse
              ctl.!default pulse


              then every ALSA application will use Pulseaudio by default (unless you configure it to use a different ALSA device). Some ALSA applications think they need to use hw:... (which is bad design), and you've to convice those applications to use default instead. A few ALSA applications try to do things that only work on hw:..., and these will cause problems, but they are rare.



              Bottom line: Routing sound is a lot easier with Pulseaudio (or with Jack) than with ALSA directly.






              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                Alternative with Pulseaudio:



                To make one application under Pulseaudio record the output of another application is fairly easy:



                Pulseaudio has the concept of sound sources and sound sinks. You can arbitrarily connect up application to those. Pulseaudio has modules to remember those connections, and will restore the connection sthe next time the application is restarted (if the connection is possible). Otherwise Pulseaudio will choose default connections for you.



                You can inspect and change all this using the pavucontrol GUI, which also allows you to change volume controls both on the connection between application and source/sink, and the source/sink itself.



                The basic use case four source/sinks is to represent hardware recording and playback. But it's not limited to that: There are various ways to create other kinds of sources and sinks. In particular, each sink has connected to it a .monitor source, which just loopbacks. Actually pavucontrol uses those to implement the sound metering display.



                So settung up two loops, are even 100 loops, or tee-shaped connections with several applications listening to one application is all really straightforward.



                If the GUI is not enough for you, there are also commandline applications pacmd and pactl, that allow scripting. See pacmd help or pactl help for details. (I've no idea why there are two of them...). However, their output is not particularly easy to parse, and needs a bit of fiddling with grep -A etc.



                Pulseaudio includes a compatibility layer to allow all ALSA applications to use Pulseaudio, via the pulse ALSA device.
                If you have an .asoundrc like



                pcm.!default pulse
                ctl.!default pulse


                then every ALSA application will use Pulseaudio by default (unless you configure it to use a different ALSA device). Some ALSA applications think they need to use hw:... (which is bad design), and you've to convice those applications to use default instead. A few ALSA applications try to do things that only work on hw:..., and these will cause problems, but they are rare.



                Bottom line: Routing sound is a lot easier with Pulseaudio (or with Jack) than with ALSA directly.






                share|improve this answer












                Alternative with Pulseaudio:



                To make one application under Pulseaudio record the output of another application is fairly easy:



                Pulseaudio has the concept of sound sources and sound sinks. You can arbitrarily connect up application to those. Pulseaudio has modules to remember those connections, and will restore the connection sthe next time the application is restarted (if the connection is possible). Otherwise Pulseaudio will choose default connections for you.



                You can inspect and change all this using the pavucontrol GUI, which also allows you to change volume controls both on the connection between application and source/sink, and the source/sink itself.



                The basic use case four source/sinks is to represent hardware recording and playback. But it's not limited to that: There are various ways to create other kinds of sources and sinks. In particular, each sink has connected to it a .monitor source, which just loopbacks. Actually pavucontrol uses those to implement the sound metering display.



                So settung up two loops, are even 100 loops, or tee-shaped connections with several applications listening to one application is all really straightforward.



                If the GUI is not enough for you, there are also commandline applications pacmd and pactl, that allow scripting. See pacmd help or pactl help for details. (I've no idea why there are two of them...). However, their output is not particularly easy to parse, and needs a bit of fiddling with grep -A etc.



                Pulseaudio includes a compatibility layer to allow all ALSA applications to use Pulseaudio, via the pulse ALSA device.
                If you have an .asoundrc like



                pcm.!default pulse
                ctl.!default pulse


                then every ALSA application will use Pulseaudio by default (unless you configure it to use a different ALSA device). Some ALSA applications think they need to use hw:... (which is bad design), and you've to convice those applications to use default instead. A few ALSA applications try to do things that only work on hw:..., and these will cause problems, but they are rare.



                Bottom line: Routing sound is a lot easier with Pulseaudio (or with Jack) than with ALSA directly.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 17 at 10:12









                dirkt

                14k2930




                14k2930






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430629%2falsa-snd-aloop-is-creating-surround-sound-devices%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)