aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/imx-wm8962.c
Commit message (Collapse)AuthorAge
* ENGR00312217-1 ASoC: fsl: pop noise with wm8962Shengjiu Wang2014-05-07
| | | | | | | | | The reason of pop noise is that we change the sysclk in hw_free, which is for another wm8962 issue. So in currently the pop noise can't be resolved with no confliction. So for Android, because the samplerate is fixed. we can use other workaround for this issue: change the sysclk in the set_bias(). Signed-off-by: Shengjiu Wang <b02247@freescale.com>
* ENGR00307635-5 ASoC: imx-wm8962: Add non-SSI cpu dai supportNicolin Chen2014-04-16
| | | | | | | | | | | | The current imx-wm8962 machine driver is designed for SSI as CPU DAI only while as its name we should make the driver more generic to any other CPU DAI on i.MX serires -- ESAI, SAI for example. So this patch makes the driver more general so as to support those non-SSI cases. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
* ENGR00306857 pulseaudio5.0 mute Headphone volume when Headphone pluggedShengjiu Wang2014-04-16
| | | | | | | Pulseaudio will detect the Headphone Jack, then swith to Headphone. So register new Jack for Headphone, the iface=CARD. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
* ENGR00295423-5 Revert "ENGR00274386-1 ASoC: imx-wm8962: Fix 192KHz playback ↵Nicolin Chen2014-04-16
| | | | | | | | | | | slow issue" The root cause of playback slow issue should be trying to get DSPCLK_DIV before enabling SYSCLK of WM8962. Since we have a patch fixed it, we can revert this work round. This reverts commit 49a3ca545a88cdf4aa597c4dd7d904b4faaea555. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
* ENGR00290229 ASoC: fsl: Drop snd_soc_dapm_sync() in imx-wm8962Nicolin Chen2014-04-16
| | | | | | | | | | | As DAPM would do the sync() for us, we don't need to handle it by ourselves. And leaving snd_soc_dapm_sync() here is dangerous because it would disable the clock from WM8962 during the short period of the output route changing since we don't leave the alternative route's enanbling to this machine driver but to DAPM core. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ENGR00279368-2 ASoC: fsl: Add missing snd_soc_pm_ops to all machine driversNicolin Chen2014-04-16
| | | | | | | | | | Alsa machine drivers need snd_soc_pm_ops to support normal suspend/resume feature, thus add this to all machine drivers. Also add missing SUSPEND and RESUME cases to trigger() in fsl_ssi.c Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ENGR00279368-1 ASoC: fsl: Drop useless resume function in WM8962 machine driverNicolin Chen2014-04-16
| | | | | | | | The resume function is useless for the driver because registered jack pin has already handled suspend/resume cases, thus drop it. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ENGR00277715-3 ASoC: fsl: Add WM8962 jack detecting supportNicolin Chen2014-04-16
| | | | | | | | There're two GPIOs connected to the headphone jack and microphone jack, thus add the states detection. Reviewed-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ENGR00277471 ASoC: fsl: Fix set-mute-failed issue after WM8962 captureNicolin Chen2014-04-16
| | | | | | | | | | | | We only need to mute WM8962 after playback, so add direction check before doing mute. And a mute failure would cause hw_free() abruptly return after it, which might drop the essential procedure code for FLL controlling. Thus put mute before FLL controlling code and drop its return check. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ENGR00274386-2 ASoC: imx-wm8962: Set MCLK source clock to 0Hz in hw_free()Nicolin Chen2014-04-16
| | | | | | | | | | | | | | When DAPM closed WM8962 after playback, its driver would prompt 'wm8962 0-001a: Unsupported sysclk ratio 500' due to the invalid divisor calculated by WM8962 codec driver. To fix it, we can work around by setting its MCLK source to 0Hz, so the codec driver would never get an invalid divisor any more. Since hw_params() would re-set the MCLK source, no need to worry about any side-effect. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ENGR00274386-1 ASoC: imx-wm8962: Fix 192KHz playback slow issueNicolin Chen2014-04-16
| | | | | | | | | | We are using auto sample rate feature of WM8962, whereas it doesn't support those sample rates bigger than 96KHz, 192Khz for example, so 384 * samplerate would be too big for it to handle. When playing 192KHz 24bit wav file, the playback would be slower than normal. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ENGR00273838-8 ASoC: WM8962: Let codec driver enable/disable its MCLKNicolin Chen2014-04-16
| | | | | | | | | WM8962 needs its MCLK when powerup -- wm8962_resume(). Thus it's better to control the MCLK in codec driver. Thus remove the clock enable in machine dirver accordingly. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ENGR00273838-7 ASoC: fsl: Use hw_params() and hw_free() to set FLLNicolin Chen2014-04-16
| | | | | | | | | We followed community way by using set_bias() to set FLL of WM8962. But this can't meet our requirement: aplay -Dhw: 16khz.wav 24khz.wav. Thus use hw_params() and hw_free() instead. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ASoC: fsl: imx-wm8962: Fix error pathFabio Estevam2014-04-16
| | | | | | | | | | If the 'failed to find codec platform device' error path is executed, it should jump to 'fail' label instead of returning an error immediately. 'fail' label will then free the ssi_np and codec_np previously acquired nodes. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: fsl: add imx-wm8962 machine driverNicolin Chen2014-04-16
Commit 8de2ae2a7f1fd71dc56d6b014029f93093e9c5d5 upstream. This is the initial imx-wm8962 device-tree-only machine driver working with fsl_ssi driver. More features can be added on top of it later. Signed-off-by: Nicolin Chen <b42378@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>