AnsweredAssumed Answered

sgtl5000 sound switch to line_in problem

Question asked by mrleo on Jun 26, 2014
Latest reply on Sep 19, 2016 by li yu

Hi all,

My custom mx6q board need switch sound to line in with sgtl5000,but have a problem in freescale android 4.2.2

below is my test method,use android tinymix command to test

Switch to line in before my board sound is ok for android system,line out and hp sound is ok

when switch to line in have some problem.

# tinymix

Number of controls: 28

ctl     type    num     name                                     value

0       INT     2       PCM Playback Volume                      156 156

1       INT     2       Capture Volume                           15 15

2       INT     1       Capture Attenuate Switch (-6dB)          0

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       BOOL    1       Bass Enable                              Off

8       INT     1       Bass Filter Feq                          1

9       INT     1       Bass Volume                              58

10      INT     1       Bass Level                               96

11      INT     1       Surround Width                           4

12      INT     1       Main Channel Volume                      100

13      INT     1       Mixer Channel Volume                     0

14      BOOL    1       AVC Enable                               Off

15      BOOL    1       AVC Hard Limit                           Off

16      INT     1       AVC Max Gain                             1

17      INT     1       AVC Threshold (-dB)                      12

18      BOOL    1       DAP_MIXER Mixer Channel                  Off

19      ENUM    1       I2S_OUT                                  ADC

20      ENUM    1       DAC_IN                                   I2S_IN

21      ENUM    1       MIX_MUX                                  ADC

22      ENUM    1       DAP_IN                                   ADC

23      ENUM    1       Headphone Mux                            DAC

24      ENUM    1       Capture Mux                              MIC_IN

25      ENUM    1       Jack Function                            off

26      ENUM    1       Speaker Function                         off

27      ENUM    1       Line In Function                         off

# tinymix  -D 0 20 ADC

# tinymix  -D 0 24 LINE_IN

# tinymix  -D 0 27 on

first I have telephone sound connect to sgtl5000 line in.

after sound switch to line in,sound is not come out.

when I click android ui back button,the sound will come out.

I found must click the back button or other button have sound when android system set the touch buttons with sound.

Switch to line in,the sound will come out. Otherwise the  sound will  not come out.

Now I must click the back button once ,the sound will come out when modify hadware tinyalsa_hal.c and sound driver sgtl5000.c

comment do_out_standby function  content in path myandroid/hardware/imx/alsa/tinyalsa_hal.c

comment  suspend and resume function in sgtl5000.c


Have some one met this issues? How to solve this issues? Have anybody give me some advices?


Thanks,


Leo

Outcomes