Difference between revisions of "Audio setup"

From Raspberry Pi Min-Grant project
Jump to: navigation, search
Line 3: Line 3:
 
'''<span style="font-size:medium;">Audio Input</span>'''
 
'''<span style="font-size:medium;">Audio Input</span>'''
  
<span style="font-size:medium;"><span style="font-size:small;">In order to record audio, we need to connect a microphone to the Pi. If you connect a USB mic, you can ensure that the Pi recognizes it by typing<span style="font-family:courier new,courier,monospace;"> lsusb</span> at the command line</span></span>
+
<span style="font-size:medium;"><span style="font-size:small;">In order to record audio, we need to connect a microphone to the Pi. If you connect a USB mic, you can ensure that the Pi recognizes it by typing<span style="font-family:courier new,courier,monospace;">lsusb</span> at the command line</span></span>
  
 
<code>pi@raspberrypi ~ $ lsusb<br/>Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.<br/>Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br/>Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.<br/>Bus 001 Device 004: ID 0000:0538<br/>Bus 001 Device 006: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller<br/>Bus 001 Device 005: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory</code>
 
<code>pi@raspberrypi ~ $ lsusb<br/>Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.<br/>Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br/>Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.<br/>Bus 001 Device 004: ID 0000:0538<br/>Bus 001 Device 006: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller<br/>Bus 001 Device 005: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory</code>
Line 11: Line 11:
 
You can obtain the device details by typing <span style="font-family:courier new,courier,monospace;">arecord -l</span>
 
You can obtain the device details by typing <span style="font-family:courier new,courier,monospace;">arecord -l</span>
  
<code>
+
<code>pi@raspberrypi ~ $ arecord -l</code>
pi@raspberrypi ~ $ arecord -l<br>
+
 
**** List of CAPTURE Hardware Devices ****<br>
+
****&nbsp;<code>List of CAPTURE Hardware Devices ****</code>
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]<br>
+
 
  Subdevices: 1/1<br>
+
<code>card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]</code>
  Subdevice #0: subdevice #0<br>
+
 
</code>
+
<code> Subdevices: 1/1
 +
 +
Subdevice #0: subdevice #0
 +
 +
</code>

Revision as of 14:01, 29 April 2015

For a number of experiments we will need to manipulate audio signals with the Raspberry Pi. Here we give a few hints on how to get audio to work.

Audio Input

In order to record audio, we need to connect a microphone to the Pi. If you connect a USB mic, you can ensure that the Pi recognizes it by typinglsusb at the command line

pi@raspberrypi ~ $ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0000:0538
Bus 001 Device 006: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller
Bus 001 Device 005: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory

Here we have connected the C-Media USB Microphone.

You can obtain the device details by typing arecord -l

pi@raspberrypi ~ $ arecord -l

​**** List of CAPTURE Hardware Devices ****

card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]

 Subdevices: 1/1

Subdevice #0: subdevice #0