2 Replies Latest reply on Jul 17, 2014 1:40 PM by rec9140

    ALSA Plugin for Line In

    rec9140

      In my setup I am testing the Wolfson using the line in.

       

      I've run the ./Record_from_line_in.sh and everything works in that test setup.

       

      What I need to do is duplicate what I use on other normal regular desktops under Linux.

       

      These utilize the DSNOOP ability of ALSA to take the Line in and turn it into two separate inputs the LEFT and RIGHT then become plugins for the software we use.

       

      With the 30+ sliders in the ALSA Mixer on the capture screen alasmixer -V capture, I have no idea how to translate this to match the setup.

       

      I use asound.conf as below to create the plugins...

       

      pcm.onboard{ type hw card 1 } ctl.onboard { type hw card 1 } ### Dsnoop both channels pcm.dsnoop_onboard { type dsnoop ipc_key 32 slave { pcm "onboard" channels 2 period_size 320 rate 48000 buffer_size 8192 format S32_LE } bindings { 0 0 1 1 } } ### Dsnoop splited channels pcm.onboard_left { type dsnoop ipc_key 32 slave { pcm "onboard" channels 2 } bindings.0 0 } pcm.onboard_right { type dsnoop ipc_key 32 slave { pcm "onboard" channels 2 } bindings.0 1 } ### PLUGS ## ### use in software in place of hw:0,0 ### device = plug:plug_onboard_left pcm.plug_onboard_left{ type route slave.pcm "onboard_left" slave.channels 1 ttable.0.0 1 } pcm.plug_onboard_right{ type route slave.pcm "onboard_right" slave.channels 1 ttable.0.0 1 }

       

      The above is based on a DESKTOP ALSA install with ONLY the standard Realtek and others sound "cards/system" on the motherboards. No other sound devices are installed. NO jack, and no pulse.. neither of which are options, thanks.

       

      In the software I set it to use plug:plug_onboard_left  OR plug:plug_onboard_right depending on what I want the software to use.

       

      Any one have any hints on doing this with the Wolfson ** LINE IN ** in Raspbian

        • Re: ALSA Plugin for Line In
          ragnar.jensen

          I'm guessing it would work if you just change the two "card 1" to "card 0".

          --

          Ragnar

            • Re: ALSA Plugin for Line In
              rec9140

              Ok... after playing with this in my lab... ALL WORKS to separate the channels for my software...

               

              One glitch.... trying to record either plugin via arecord or anything else seems to be "blocked?"

               

              [code]

              arecord -d:plug:plug_onboard_right -d 20 -r 48000 -c 1 -f S32_LE NWRTest.wav

              arecord: main:682: audio open error: Device or resource busy

              [/code]

               

              Doing this on a "DESKTOP" under Kubuntu works.. same plugins...

               

              Any ideas??? Comments, Suggestions, Buehler?

               

              .asoundrc below for reference....

               

               

              [code]

              pcm.wolfson_pi_soundcard {

                  type hw

                  card sndrpiwsp

                  device 0

              }

               

              pcm.softvol {

                  type            softvol

                  slave {

                      pcm         "wolfson_pi_soundcard"

                  }

                  control {

                      name        "Master"

                      card        0

                  }

              }

               

              pcm.onboard{

                  type hw

                  card 0

              }

              ctl.onboard {

                  type hw

                  card 0

              }

              ### Dsnoop both channels

              pcm.dsnoop_onboard {

                  type dsnoop

                  ipc_key 32

                  slave {

                      pcm "onboard"

                      channels 2

                      period_size 320

                      rate 48000

                      buffer_size 8192

                      format S32_LE

                  }

                  bindings {

                      0 0

                      1 1

                  }

              }

              ### Dsnoop splited channels

              pcm.onboard_left {

                   type dsnoop

                   ipc_key 32

                   slave {

                       pcm "onboard"

                       channels 2

                   }

                   bindings.0  0

              }

               

              pcm.onboard_right {

                   type dsnoop

                   ipc_key 32

                   slave {

                       pcm "onboard"

                       channels 2

                   }

                   bindings.0  1

              }

               

              ### PLUGS ##

              ### used with encoders

              ### device = plug:plug_onboard_left

              pcm.plug_onboard_left{

                      type route

                      slave.pcm "onboard_left"

                      slave.channels 1

                      ttable.0.0 1

              }

              pcm.plug_onboard_right{

                      type route

                      slave.pcm "onboard_right"

                      slave.channels 1

                      ttable.0.0 1

              }

               

              pcm.plug_onboard_RECCHAN{

                      type route

                      slave.pcm "onboard_left"

                      slave.channels 1

                      ttable.0.0 1

              }

              [/code]