IoTGateway/BSP/Android/Gettingstarted/How to use Audio for rk

From ESS-WIKI
Jump to: navigation, search

Audio Card List

# su
# cat /proc/asound/cards
0 [RKRT5660       ]: RK_RT5660 - RK_RT5660
                      RK_RT5660


Andorid Audio tools

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: 'RK_RT5660'
Number of controls: 70
ctl     type    num     name                                     value
0       BOOL    1       Speaker Playback Switch                  Off
1       BOOL    1       Speaker Channel Switch                   On
2       INT     1       Speaker Playback Volume                  31
3       BOOL    2       OUT Playback Switch                      Off Off
4       BOOL    2       OUT Channel Switch                       On On
5       INT     2       OUT Playback Volume                      31 31
6       INT     2       DAC1 Playback Volume                     175 175
7       ENUM    1       IN1 Mode Control                         Single ended
8       INT     1       IN1 Boost                                0
9       ENUM    1       IN2 Mode Control                         Single ended
10      INT     1       IN2 Boost                                0
11      ENUM    1       IN3 Mode Control                         Single ended
12      INT     1       IN3 Boost                                0
13      ENUM    1       IN4 Mode Control                         Single ended
14      INT     1       IN4 Boost                                0
15      BOOL    2       ADC Capture Switch                       Off Off
16      INT     2       ADC Capture Volume                       47 47
17      INT     2       STO1 ADC Boost Gain                      0 0
18      BOOL    1       LOUT MIX DAC Switch                      On
19      BOOL    1       LOUT MIX OUTMIX Switch                   Off
20      BOOL    1       SPO MIX DACR Switch                      Off
21      BOOL    1       SPO MIX DACL Switch                      Off
22      BOOL    1       SPO MIX SPKVOL Switch                    On
23      BOOL    1       SPO MIX BST1 Switch                      Off
24      BOOL    1       LOUTVOL R Switch                         On
25      BOOL    1       LOUTVOL L Switch                         On
26      BOOL    1       SPKVOL Switch                            On
27      BOOL    1       OUT MIXR BST4 Switch                     Off
28      BOOL    1       OUT MIXR BST2 Switch                     Off
29      BOOL    1       OUT MIXR BST1 Switch                     Off
30      BOOL    1       OUT MIXR RECMIXR Switch                  Off
31      BOOL    1       OUT MIXR DACR Switch                     On
32      BOOL    1       OUT MIXR DACL Switch                     Off
33      BOOL    1       OUT MIXL BST3 Switch                     Off
34      BOOL    1       OUT MIXL BST2 Switch                     Off
35      BOOL    1       OUT MIXL BST1 Switch                     Off
36      BOOL    1       OUT MIXL RECMIXL Switch                  Off
37      BOOL    1       OUT MIXL DACR Switch                     Off
38      BOOL    1       OUT MIXL DACL Switch                     On
39      BOOL    1       SPK MIX BST3 Switch                      Off
40      BOOL    1       SPK MIX BST1 Switch                      Off
41      BOOL    1       SPK MIX DACL Switch                      On
42      BOOL    1       SPK MIX DACR Switch                      On
43      BOOL    1       SPK MIX OUTMIXL Switch                   Off
44      BOOL    1       Stereo DAC MIXR DAC R1 Switch            On
45      BOOL    1       Stereo DAC MIXR DAC L1 Switch            Off
46      BOOL    1       Stereo DAC MIXL DAC L1 Switch            On
47      BOOL    1       Stereo DAC MIXL DAC R1 Switch            Off
48      BOOL    1       DAC1 MIXR Stereo ADC Switch              Off
49      BOOL    1       DAC1 MIXR DAC1 Switch                    On
50      BOOL    1       DAC1 MIXL Stereo ADC Switch              Off
51      BOOL    1       DAC1 MIXL DAC1 Switch                    On
52      BOOL    1       Sto1 ADC MIXR ADC1 Switch                On
53      BOOL    1       Sto1 ADC MIXR ADC2 Switch                Off
54      BOOL    1       Sto1 ADC MIXL ADC1 Switch                On
55      BOOL    1       Sto1 ADC MIXL ADC2 Switch                Off
56      BOOL    1       RECMIXR BST4 Switch                      Off
57      BOOL    1       RECMIXR BST3 Switch                      Off
58      BOOL    1       RECMIXR BST2 Switch                      Off
59      BOOL    1       RECMIXR BST1 Switch                      Off
60      BOOL    1       RECMIXR OUT MIXR Switch                  Off
61      BOOL    1       RECMIXL BST4 Switch                      Off
62      BOOL    1       RECMIXL BST3 Switch                      Off
63      BOOL    1       RECMIXL BST2 Switch                      Off
64      BOOL    1       RECMIXL BST1 Switch                      Off
65      BOOL    1       RECMIXL OUT MIXL Switch                  Off
66      BOOL    1       Mic Jack Switch                          On
67      BOOL    1       Headset Jack Switch                      On
68      BOOL    1       Ext Spk Switch                           On
69      BOOL    1       Headphone Jack Switch                    On