Fwd: how to configure asound.conf for usb mic

55 views
Skip to first unread message

vishal bhoj

unread,
Dec 23, 2009, 2:31:54 AM12/23/09
to 0xlab...@googlegroups.com


---------- Forwarded message ----------
From: vishal bhoj <visha...@gmail.com>
Date: Wed, Dec 23, 2009 at 12:01 PM
Subject: how to configure asound.conf for usb mic
To: android...@googlegroups.com


Since there is a fault on my beagleboard I am unable to capture from the onboard mic in.

I am trying to use a usb camera on android.video capture  is working.I want to use the uac input as mic on android.

I am able to record from the usb mic  by using alsa_arecord .
I am trying to configure asound.conf but I don't understand how it has to be configured.I tried changing the device name in asound.conf
This is how it looks as of now. Can anyone tell me what are hooks ?


# #
# # Mixer devices
# #
ctl.AndroidPlayback {
    type hw
    card omap3beagle # Can replace with drivers name from /proc/asound/cards
}

ctl.AndroidRecord {
    type hw
    card U0x46d0x9a2
}

pcm_slave.slave_record {
    pcm AndroidRecord_Speaker_normal_plug
}

pcm.AndroidRecord_Speaker_normal_plug {
    type plug
    slave.pcm {
        type hw
        card U0x46d0x9a2
        device 0
    }
}

# #
# # Playback devices
# #
pcm.AndroidPlayback {
    type hooks
    slave.pcm {
        type hw
        card omap3beagle
        device 0
    }
    hooks.0 {
        type ctl_elems
        hook_args [
        {
            name 'DAC2 Digital Fine Playback Volume'
            value.0 63
            value.1 63
        }
        {
            name 'DAC2 Analog Playback Switch'
            value.0 true
            value.1 true
        }
        {
            name 'DAC2 Analog Playback Volume'
            value.0 18
            value.1 18
        }
        ]
    }
}

pcm.AndroidPlayback_Speaker {
    type hooks
    slave.pcm {
        type hw
        card omap3beagle
        device 0
    }
    hooks.0 {
        type ctl_elems
        hook_args [

        {
            name 'DAC2 Digital Fine Playback Volume'
            value.0 63
            value.1 63
        }
        {
            name 'DAC2 Analog Playback Switch'
            value.0 true
            value.1 true
        }
        {
            name 'DAC2 Analog Playback Volume'
            value.0 18
            value.1 18
        }

        ]
    }
}

pcm.AndroidPlayback_Speaker_normal {
    type hooks
    slave.pcm {
        type hw
        card omap3beagle
        device 0
    }
    hooks.0 {
        type ctl_elems
        hook_args [

        {
            name 'DAC2 Digital Fine Playback Volume'
            value.0 63
            value.1 63
        }
        {
            name 'DAC2 Analog Playback Switch'
            value.0 true
            value.1 true
        }
        {
            name 'DAC2 Analog Playback Volume'
            value.0 18
            value.1 18
        }

        ]
    }

}

pcm.AndroidPlayback_Bluetooth-A2DP_normal {
    type null
}

pcm.AndroidPlayback_Bluetooth-A2DP_ringtone {
    type null
}

pcm.AndroidRecord {
    type hooks
    slave slave_record
    hooks.0 {
        type ctl_elems
        hook_args [
        {
            name 'Analog Capture Volume'
            value.0 50
            value.1 50
        }
        {
            name 'Analog Right Capture Route'
            value AUXR
        }
        {
            name 'Analog Left Capture Route'
            value AUXL
        }
         {
            name 'TX1 Capture Route'
            value Analog
        }

        ]
    }
}

pcm.AndroidRecord_Speaker {
    type hooks
    slave slave_record
    hooks.0 {
        type ctl_elems
        hook_args [
        {
            name 'Analog Capture Volume'
            value.0 40
            value.1 40
        }
        {
            name 'Analog Right Capture Route'
            value AUXR
        }
        {
            name 'Analog Left Capture Route'
            value AUXL
        }
         {
            name 'TX1 Capture Route'
            value Analog
        }

        ]
    }

}

pcm.AndroidRecord_Speaker_normal {
    type hooks
    slave slave_record
    hooks.0 {
        type ctl_elems
        hook_args [
        {
            name 'Analog Capture Volume'
            value.0 30
            value.1 30
        }
        {
            name 'Analog Right Capture Route'
            value AUXR
        }
        {
            name 'Analog Left Capture Route'
            value AUXL
        }
        {
            name 'TX1 Capture Route'
            value Analog
        }
 
        ]
    }

}



--
with regards vishal



--
with regards vishal

Jeremy Chang

unread,
Dec 23, 2009, 3:49:49 AM12/23/09
to 0xlab...@googlegroups.com
On Wed, Dec 23, 2009 at 3:31 PM, vishal bhoj <visha...@gmail.com> wrote:


---------- Forwarded message ----------
From: vishal bhoj <visha...@gmail.com>
Date: Wed, Dec 23, 2009 at 12:01 PM
Subject: how to configure asound.conf for usb mic
To: android...@googlegroups.com


Since there is a fault on my beagleboard I am unable to capture from the onboard mic in.
Hi, vishal:
    For beagleboard onboard, there is only audio linein, so we do audio recording as showing in http://0xdroid.googlecode.com/issues/attachment?aid=383687233943152741&name=beagleboard-linein.jpg&inline=1

 

I am trying to use a usb camera on android.video capture  is working.I want to use the uac input as mic on android.

I am able to record from the usb mic  by using alsa_arecord .
I am trying to configure asound.conf but I don't understand how it has to be configured.I tried changing the device name in asound.conf
This is how it looks as of now. Can anyone tell me what are hooks ?

I don't have an uac, so I don't know how to try.  It's cool arecord can work.  In 0xdroid distribution, there is no /etc/asound.conf  and here is an issue fixed before for reference, http://code.google.com/p/0xdroid/issues/detail?id=10     though I may not answer your question about asound.conf

thanks,
-Jeremy

--

You received this message because you are subscribed to the Google Groups "0xlab-devel" group.
To post to this group, send email to 0xlab...@googlegroups.com.
To unsubscribe from this group, send email to 0xlab-devel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/0xlab-devel?hl=en.

Reply all
Reply to author
Forward
0 new messages