Difference between revisions of "IoTGateway/BSP/Android/Gettingstarted/How to use Audio"

From ESS-WIKI
Jump to: navigation, search
(Created page with "<span style="font-size:large;">'''Audio Card List'''</span> <pre>'''<span style="font-size:small;"></span>'''# cat /proc/asound/cards 0 [sgtl5000 ]: sgtl5000 - sgtl5000...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<span style="font-size:large;">'''Audio Card List'''</span>
 
<span style="font-size:large;">'''Audio Card List'''</span>
<pre>'''<span style="font-size:small;"></span>'''# cat /proc/asound/cards
+
<pre># cat /proc/asound/cards
 
  0 [sgtl5000      ]: sgtl5000 - sgtl5000
 
  0 [sgtl5000      ]: sgtl5000 - sgtl5000
 
                       sgtl5000</pre>
 
                       sgtl5000</pre>
  
<span style="font-size:large;"></span>
+
 
  
 
<span style="font-size:large;">'''Andorid Audio tools'''</span>
 
<span style="font-size:large;">'''Andorid Audio tools'''</span>
  
'''<span style="font-size:x-large;"></span>'''<span style="font-size:medium;"></span>'''<span style="font-size:medium;">Tinycap</span>'''
+
'''<span style="font-size:medium;">Tinycap</span>'''
  
 
Record wav file
 
Record wav file
Line 18: Line 18:
 
Capturing sample: 2 ch, 44100 hz, 16 bit</pre>
 
Capturing sample: 2 ch, 44100 hz, 16 bit</pre>
  
'''<span style="font-size:medium;"></span>'''note: press ctrl+c to terminate tinycap if wanting to finish capturing
+
note: press ctrl+c to terminate tinycap if wanting to finish capturing
  
 
'''<span style="font-size:medium;">TinyPlay</span>'''
 
'''<span style="font-size:medium;">TinyPlay</span>'''
<pre><span style="font-size:medium;"></span># tinyplay
+
<pre># tinyplay
 
Usage: tinyplay file.wav [-D card] [-d device] [-p period_size] [-n n_periods]</pre>
 
Usage: tinyplay file.wav [-D card] [-d device] [-p period_size] [-n n_periods]</pre>
  
Line 31: Line 31:
  
 
<span style="font-size:small;">Get mixers</span>
 
<span style="font-size:small;">Get mixers</span>
<pre><span style="font-size:small;"></span># tinymix -D 0
+
<pre># tinymix -D 0
 
Mixer name: 'sgtl5000'
 
Mixer name: 'sgtl5000'
 
Number of controls: 9
 
Number of controls: 9

Latest revision as of 07:49, 6 February 2017

Audio Card List

# cat /proc/asound/cards
 0 [sgtl5000       ]: sgtl5000 - sgtl5000
                      sgtl5000


Andorid Audio tools

Tinycap

Record wav file

# tinycap
Usage: tinycap file.wav [-D card] [-d device] [-c channels] [-r rate] [-b bits] [-p period_size] [-n n_periods]

example:

# tinycap /data/test.wav -D 0
Capturing sample: 2 ch, 44100 hz, 16 bit

note: press ctrl+c to terminate tinycap if wanting to finish capturing

TinyPlay

# tinyplay
Usage: tinyplay file.wav [-D card] [-d device] [-p period_size] [-n n_periods]

example:

# tinyplay /data/test.wav -D 0
Playing sample: 2 ch, 44100 hz, 16 bit

Tinymix

Get mixers

# tinymix -D 0
Mixer name: 'sgtl5000'
Number of controls: 9
ctl     type    num     name                                     value
0       INT     2       PCM Playback Volume                      156 156
1       INT     2       Capture Volume                           15 15
2       BOOL    1       Capture Attenuate Switch (-6dB)          Off
3       BOOL    1       Capture ZC Switch                        On
4       INT     2       Headphone Playback Volume                103 103
5       BOOL    1       Headphone Playback ZC Switch             On
6       INT     1       Mic Volume                               0
7       ENUM    1       Headphone Mux                            DAC
8       ENUM    1       Capture Mux                              MIC_IN

Set mixer

# tinymix -D 0 0 192