element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum ALSA Plugin for Line In
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 2 replies
  • Subscribers 675 subscribers
  • Views 773 views
  • Users 0 members are here
  • wolfson
  • alsa
  • raspberry_pi
  • plugin
  • raspeberry_pi_accessories
Related

ALSA Plugin for Line In

rec9140
rec9140 over 11 years ago

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

Attachments:
asound_PLUGINS.conf.zip
  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 11 years ago

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

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • rec9140
    0 rec9140 over 11 years ago in reply to Former Member

    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]

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube