ASoC: fsl: move fsl_ssi to generic DMA DT bindings

It removes the temporary custom DMA bindings from fsl_ssi driver and use
the generic one instead.  It leaves imx-ssi drive unchanged regarding
those pcm flags by updating imx_pcm_dma_init() to let SSI driver decide
the flags.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
ENGR00273838-1 ASoC: fsl: Add debug interface for ssi

Add debug interface for ssi to dump its register values.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
ENGR00273838-5 ASoC: fsl: Add clock control for ssi

Enable core clock when startup and disable it when shutdown to save power.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>

This has been rewritten to work with the 3.14 kernel

Signed-off-by: Jon Nettleton <jon.nettleton@gmail.com>
ENGR00273838-7 ASoC: fsl: Use hw_params() and hw_free() to set FLL

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>
ENGR00273838-8 ASoC: WM8962: Let codec driver enable/disable its MCLK

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-9 ASoC: WM8962: Remove 64KHz sample rate support

64KHz is not in the auto samplerate list of WM8962. When playing a 64KHz
wave file, 'Unsupported rate 64000Hz' will be prompted.

Thus remove to let alsa-lib handle it.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
ENGR00273838-10 ASoC: WM8962: Set default Volume for playback/capture

Set default volume for playback(Headphone, Speaker) and Capture(ADC, input).
This would let playback have a normal volume after system boot up.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
ENGR00274585-2 ASoC: codec: add codec driver cs42888

Add codec driver cs42888.
Add bindings document for cs42888 audio codec.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
ENGR00274585-3 ASoC: fsl: add asrc p2p driver.

add asrc p2p driver.
add bindings document of asrc p2p.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
ENGR00274585-5 ASoC: fsl: add cs42888 machine driver.

add cs42888 machine driver.
add bindings document of cs42888 machine.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
ENGR00274585-6 ASoC: fsl: update format and buffer size in the pcm dma

1. add 24bit format support.
2. enlarge the buffer size for ESAI.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
ENGR00274585-9 ASoC: change error message to debug message

This error message is not actual error, which is a warning. When using
FE/BE, if there is widget which is used by playback and capture route, then
this message will be printed.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
ENGR00277458-1 ASoC: fsl: Use correct flag for imx_pcm_dma_init()

We are using generic dma binding from devicetree for spdif, thus use
the correct flag.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
ENGR00277299-3 ASoC: fsl: Add dma driver for hdmi audio

i.MX HDMI audio uses its own AHB DMA while there's also an extra SDMA channel
to update its buffer addresses. Thus add a new driver for HDMI audio.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
ENGR00277299-4 ASoC: fsl: Add hdmi audio cpu dai driver

Add hdmi audio cpu dai dirver

Signed-off-by: Nicolin Chen <b42378@freescale.com>
ENGR00277299-5 ASoC: fsl: Add hdmi audio machine driver

Add hdmi audio machine dirver

Signed-off-by: Nicolin Chen <b42378@freescale.com>
ENGR00277715-1 ASoC: codec: Enable cache-only before power down in probe()

We need to enable cache-only for regcache before wm8962 being power-down.

Otherwise some configurations via amixer might be invalid before one stream,
playback or record, actually happens.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
ENGR00277715-3 ASoC: fsl: Add WM8962 jack detecting support

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>
ENGR00278382 ASoC: fsl: Fix hdmi audio loadable module failure

Use platform_device_add() which can pass drvdata correctly: previously
we register the dma_dev first and pass its drvdata, but this would fail
to pass its drvdata correctly when using loadable module, because the
probe() hdmi dma driver would be executed right after the register()
and before set_drvdata(). Then the drvdata actually failed to be set
to the hdmi dma driver. While platform_device_add() has no such issue
because it would finish the set_drvdata() before its execution.

This patch also move codec driver registering into CPU DAI driver.
When using autoload module, the codec driver would alwasy fail to
be detected due to its registering located in manchine driver.
Thus move this to CPU DAI driver.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
ENGR00278967 ASoC: fsl: Fix null pointer when rmmod snd-soc-imx-hdmi

When rmmod snd-soc-imx-hdmi if loadable module feature of HDMI audio
is being used, there would be a kernel dump promt:
Unable to handle kernel NULL pointer dereference at virtual address

This was caused by inappropriate priv pointer fetching, thus fix it.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>