wm8960 playback sound small

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

wm8960 playback sound small

5,615 Views
fresxc
Contributor I

Hi all

I use wm8960 on imx6ul, linux4.1.15. When i playback Front_Center.wav , i can hear the sound, but the sound is very small. Anybody can help me that make it bigger? 

Thanks

Fresxc

Labels (3)
Tags (3)
0 Kudos
Reply
9 Replies

4,009 Views
jimmychan
NXP TechSupport
NXP TechSupport

have you check alsamixer -V? you can adjust the Playback volume and switch on/off the Amp/Gain there.

0 Kudos
Reply

4,009 Views
fresxc
Contributor I

Hi Jim

Here is the logging:

root@freescale ~$ amixer -v
amixer version 1.0.22

root@freescale ~$ amixer controls
numid=12,iface=MIXER,name='Headphone Playback ZC Switch'
numid=11,iface=MIXER,name='Headphone Playback Volume'
numid=17,iface=MIXER,name='PCM Playback -6dB Switch'
numid=44,iface=MIXER,name='Mono Output Mixer Left Switch'
numid=45,iface=MIXER,name='Mono Output Mixer Right Switch'
numid=41,iface=MIXER,name='ADC Data Output Select'
numid=19,iface=MIXER,name='ADC High Pass Filter Switch'
numid=36,iface=MIXER,name='ADC PCM Capture Volume'
numid=18,iface=MIXER,name='ADC Polarity'
numid=2,iface=MIXER,name='Capture Volume ZC Switch'
numid=3,iface=MIXER,name='Capture Switch'
numid=1,iface=MIXER,name='Capture Volume'
numid=10,iface=MIXER,name='Playback Volume'
numid=23,iface=MIXER,name='3D Filter Lower Cut-Off'
numid=22,iface=MIXER,name='3D Filter Upper Cut-Off'
numid=25,iface=MIXER,name='3D Switch'
numid=24,iface=MIXER,name='3D Volume'
numid=33,iface=MIXER,name='ALC Attack'
numid=32,iface=MIXER,name='ALC Decay'
numid=26,iface=MIXER,name='ALC Function'
numid=30,iface=MIXER,name='ALC Hold Time'
numid=27,iface=MIXER,name='ALC Max Gain'
numid=29,iface=MIXER,name='ALC Min Gain'
numid=31,iface=MIXER,name='ALC Mode'
numid=28,iface=MIXER,name='ALC Target'
numid=21,iface=MIXER,name='DAC Deemphasis Switch'
numid=20,iface=MIXER,name='DAC Polarity'
numid=59,iface=MIXER,name='Left Boost Mixer LINPUT1 Switch'
numid=57,iface=MIXER,name='Left Boost Mixer LINPUT2 Switch'
numid=58,iface=MIXER,name='Left Boost Mixer LINPUT3 Switch'
numid=9,iface=MIXER,name='Left Input Boost Mixer LINPUT1 Volume'
numid=7,iface=MIXER,name='Left Input Boost Mixer LINPUT2 Volume'
numid=6,iface=MIXER,name='Left Input Boost Mixer LINPUT3 Volume'
numid=53,iface=MIXER,name='Left Input Mixer Boost Switch'
numid=51,iface=MIXER,name='Left Output Mixer Boost Bypass Switch'
numid=37,iface=MIXER,name='Left Output Mixer Boost Bypass Volume'
numid=50,iface=MIXER,name='Left Output Mixer LINPUT3 Switch'
numid=38,iface=MIXER,name='Left Output Mixer LINPUT3 Volume'
numid=49,iface=MIXER,name='Left Output Mixer PCM Playback Switch'
numid=35,iface=MIXER,name='Noise Gate Switch'
numid=34,iface=MIXER,name='Noise Gate Threshold'
numid=56,iface=MIXER,name='Right Boost Mixer RINPUT1 Switch'
numid=54,iface=MIXER,name='Right Boost Mixer RINPUT2 Switch'
numid=55,iface=MIXER,name='Right Boost Mixer RINPUT3 Switch'
numid=8,iface=MIXER,name='Right Input Boost Mixer RINPUT1 Volume'
numid=5,iface=MIXER,name='Right Input Boost Mixer RINPUT2 Volume'
numid=4,iface=MIXER,name='Right Input Boost Mixer RINPUT3 Volume'
numid=52,iface=MIXER,name='Right Input Mixer Boost Switch'
numid=48,iface=MIXER,name='Right Output Mixer Boost Bypass Switch'
numid=39,iface=MIXER,name='Right Output Mixer Boost Bypass Volume'
numid=46,iface=MIXER,name='Right Output Mixer PCM Playback Switch'
numid=47,iface=MIXER,name='Right Output Mixer RINPUT3 Switch'
numid=40,iface=MIXER,name='Right Output Mixer RINPUT3 Volume'
numid=16,iface=MIXER,name='Speaker AC Volume'
numid=15,iface=MIXER,name='Speaker DC Volume'
numid=13,iface=MIXER,name='Speaker Playback Volume'
numid=14,iface=MIXER,name='Speaker Playback ZC Switch'

root@freescale ~$ amixer cset numid=12,iface=MIXER,name='Headphone Playback ZC Switch' 1
numid=12,iface=MIXER,name='Headphone Playback ZC Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on

root@freescale ~$ amixer cset numid=11,iface=MIXER,name='Headphone Playback Volume' 127
numid=11,iface=MIXER,name='Headphone Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
: values=127,127
| dBscale-min=-121.00dB,step=1.00dB,mute=1

root@freescale ~$amixer cset numid=49,iface=MIXER,name='Left Output Mixer PCM Playback Switch' 1
numid=49,iface=MIXER,name='Left Output Mixer PCM Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on

root@freescale ~$ amixer cset numid=46,iface=MIXER,name='Right Output Mixer PCM Playback Switch' 1
numid=46,iface=MIXER,name='Right Output Mixer PCM Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on

root@freescale ~$ amixer cget numid=10,iface=MIXER,name='Playback Volume'
numid=10,iface=MIXER,name='Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=255,step=0
: values=255,255
| dBscale-min=-127.50dB,step=0.50dB,mute=1

This is my configure. 

Do I still need other settings? If so, could you tell me?

Thanks 

Fresxc

0 Kudos
Reply

4,009 Views
jimmychan
NXP TechSupport
NXP TechSupport

Hi,

This may helpful for you.

https://community.nxp.com/docs/DOC-106295 

You can see the audio path can be different that depends how you route it.

Please check the audio path that you are using. Find the corresponding name of the switch and then switch on via amixer and adjust the volume.

0 Kudos
Reply

4,009 Views
fresxc
Contributor I

Hi Jimmy

It's realy helpful. But i can not found where is the wrong. Can you help me to check it? 

Here is my configure:

root@imx6ulevk:~# amixer contents
numid=12,iface=MIXER,name='Headphone Playback ZC Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=11,iface=MIXER,name='Headphone Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
: values=127,127
| dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=17,iface=MIXER,name='PCM Playback -6dB Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=43,iface=MIXER,name='Mono Output Mixer Left Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=44,iface=MIXER,name='Mono Output Mixer Right Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=41,iface=MIXER,name='ADC Data Output Select'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'Left Data = Left ADC; Right Data = Right ADC'
; Item #1 'Left Data = Left ADC; Right Data = Left ADC'
; Item #2 'Left Data = Right ADC; Right Data = Right ADC'
; Item #3 'Left Data = Right ADC; Right Data = Left ADC'
: values=1
numid=19,iface=MIXER,name='ADC High Pass Filter Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=36,iface=MIXER,name='ADC PCM Capture Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=255,step=0
: values=195,195
| dBscale-min=-97.50dB,step=0.50dB,mute=1
numid=18,iface=MIXER,name='ADC Polarity'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'No Inversion'
; Item #1 'Left Inverted'
; Item #2 'Right Inverted'
; Item #3 'Stereo Inversion'
: values=0
numid=2,iface=MIXER,name='Capture Volume ZC Switch'
; type=INTEGER,access=rw------,values=2,min=0,max=1,step=0
: values=0,0
numid=3,iface=MIXER,name='Capture Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=1,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
: values=35,35
| dBscale-min=-17.25dB,step=0.75dB,mute=0
numid=10,iface=MIXER,name='Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=255,step=0
: values=235,235
| dBscale-min=-127.50dB,step=0.50dB,mute=1
numid=23,iface=MIXER,name='3D Filter Lower Cut-Off'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'Low'
; Item #1 'High'
: values=0
numid=22,iface=MIXER,name='3D Filter Upper Cut-Off'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'High'
; Item #1 'Low'
: values=0
numid=25,iface=MIXER,name='3D Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=24,iface=MIXER,name='3D Volume'
; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
: values=0
numid=33,iface=MIXER,name='ALC Attack'
; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
: values=2
numid=32,iface=MIXER,name='ALC Decay'
; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
: values=3
numid=26,iface=MIXER,name='ALC Function'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'Off'
; Item #1 'Right'
; Item #2 'Left'
; Item #3 'Stereo'
: values=0
numid=30,iface=MIXER,name='ALC Hold Time'
; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
: values=0
numid=27,iface=MIXER,name='ALC Max Gain'
; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
: values=7
numid=29,iface=MIXER,name='ALC Min Gain'
; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
: values=0
numid=31,iface=MIXER,name='ALC Mode'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'ALC'
; Item #1 'Limiter'
: values=0
numid=28,iface=MIXER,name='ALC Target'
; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
: values=4
numid=21,iface=MIXER,name='DAC Deemphasis Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=42,iface=MIXER,name='DAC Mono Mix'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'Stereo'
; Item #1 'Mono'
: values=0
numid=20,iface=MIXER,name='DAC Polarity'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'No Inversion'
; Item #1 'Left Inverted'
; Item #2 'Right Inverted'
; Item #3 'Stereo Inversion'
: values=0
numid=58,iface=MIXER,name='Left Boost Mixer LINPUT1 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=56,iface=MIXER,name='Left Boost Mixer LINPUT2 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=57,iface=MIXER,name='Left Boost Mixer LINPUT3 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=9,iface=MIXER,name='Left Input Boost Mixer LINPUT1 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=3,step=0
: values=0
| dBrange-
rangemin=0,,rangemax=1
| dBscale-min=0.00dB,step=13.00dB,mute=0
rangemin=2,,rangemax=3
| dBscale-min=20.00dB,step=9.00dB,mute=0

numid=7,iface=MIXER,name='Left Input Boost Mixer LINPUT2 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=0
| dBscale-min=-15.00dB,step=3.00dB,mute=1
numid=6,iface=MIXER,name='Left Input Boost Mixer LINPUT3 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=0
| dBscale-min=-15.00dB,step=3.00dB,mute=1
numid=52,iface=MIXER,name='Left Input Mixer Boost Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=50,iface=MIXER,name='Left Output Mixer Boost Bypass Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=37,iface=MIXER,name='Left Output Mixer Boost Bypass Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=2
| dBscale-min=-21.00dB,step=3.00dB,mute=0
numid=49,iface=MIXER,name='Left Output Mixer LINPUT3 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=38,iface=MIXER,name='Left Output Mixer LINPUT3 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=2
| dBscale-min=-21.00dB,step=3.00dB,mute=0
numid=48,iface=MIXER,name='Left Output Mixer PCM Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=35,iface=MIXER,name='Noise Gate Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=34,iface=MIXER,name='Noise Gate Threshold'
; type=INTEGER,access=rw------,values=1,min=0,max=31,step=0
: values=0
numid=55,iface=MIXER,name='Right Boost Mixer RINPUT1 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=53,iface=MIXER,name='Right Boost Mixer RINPUT2 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=54,iface=MIXER,name='Right Boost Mixer RINPUT3 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=8,iface=MIXER,name='Right Input Boost Mixer RINPUT1 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=3,step=0
: values=0
| dBrange-
rangemin=0,,rangemax=1
| dBscale-min=0.00dB,step=13.00dB,mute=0
rangemin=2,,rangemax=3
| dBscale-min=20.00dB,step=9.00dB,mute=0

numid=5,iface=MIXER,name='Right Input Boost Mixer RINPUT2 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=0
| dBscale-min=-15.00dB,step=3.00dB,mute=1
numid=4,iface=MIXER,name='Right Input Boost Mixer RINPUT3 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=0
| dBscale-min=-15.00dB,step=3.00dB,mute=1
numid=51,iface=MIXER,name='Right Input Mixer Boost Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=47,iface=MIXER,name='Right Output Mixer Boost Bypass Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=39,iface=MIXER,name='Right Output Mixer Boost Bypass Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=2
| dBscale-min=-21.00dB,step=3.00dB,mute=0
numid=45,iface=MIXER,name='Right Output Mixer PCM Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=46,iface=MIXER,name='Right Output Mixer RINPUT3 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=40,iface=MIXER,name='Right Output Mixer RINPUT3 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=2
| dBscale-min=-21.00dB,step=3.00dB,mute=0
numid=16,iface=MIXER,name='Speaker AC Volume'
; type=INTEGER,access=rw------,values=1,min=0,max=5,step=0
: values=0
numid=15,iface=MIXER,name='Speaker DC Volume'
; type=INTEGER,access=rw------,values=1,min=0,max=5,step=0
: values=0
numid=13,iface=MIXER,name='Speaker Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
: values=110,110
| dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=14,iface=MIXER,name='Speaker Playback ZC Switch'
; type=BOOLEAN,access=rw------,values=2
: values=off,off

Regards

Fresxc

0 Kudos
Reply

4,009 Views
arthur_rythm
Contributor III

Did you find a solution? Same issue here. The sound is excellent on the speaker. But very weak when with a headphone.

In alsamixer, there is a Headphone widget, but between 0 and 100 no change at all on volume.

0 Kudos
Reply

4,009 Views
arthur_rythm
Contributor III

Just removing the hp-det code, all is now working correctly. The sound is very loud and headphone widget is working in alsamixer. 

diff --git a/sound/soc/fsl/imx-wm8960.c b/sound/soc/fsl/imx-wm8960.c
index c233974f132d..bfeea9042204 100644
--- a/sound/soc/fsl/imx-wm8960.c
+++ b/sound/soc/fsl/imx-wm8960.c
@@ -410,11 +410,14 @@ static int imx_wm8960_late_probe(struct snd_soc_card *card)
        /* GPIO1 used as headphone detect output */
        //snd_soc_update_bits(codec, WM8960_ADDCTL4, 7<<4, 3<<4);
 
+       // Disable this to fix volume issue
        /* Enable headphone jack detect */
+       /*
        snd_soc_update_bits(codec, WM8960_ADDCTL2, 1<<6, 1<<6);
        snd_soc_update_bits(codec, WM8960_ADDCTL2, 1<<5, data->hp_det[1]<<5);
        snd_soc_update_bits(codec, WM8960_ADDCTL4, 3<<2, data->hp_det[0]<<2);
        snd_soc_update_bits(codec, WM8960_ADDCTL1, 3, 3);
+       */
 
        return 0;
 }
Not sure to know why the hp-det feature broke everything in the microphone.

4,009 Views
承王
Contributor I

你好,请问问题最后解决了吗?我也遇到了相同的问题

0 Kudos
Reply

4,009 Views
aravinthkumarja
Senior Contributor II

Hi Fresxc, 

Can you tell me which BSP your are using.?

Also your output device is Speaker or Headphone.?

Regards,

Aravinth

0 Kudos
Reply

4,009 Views
fresxc
Contributor I

Hi Aravin

Thands for your reply.

I'm using linux4.1.15 and output from Headphone.

Can you give me some advice?

 

Regards

Fresxc

0 Kudos
Reply