neon
ASoC: OMAP4 ABE: Add CONFIG_SND_OMAP4_ABE_USE_ALT_FW

This enables a build to load the alternate ABE Firmware.

Change-Id: I5772616c576234845d0e839067d5b85f232f12be
Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>
ASoC: OMAP4 ABE: Allow an alternate ABE firmware to be used.

On commit 52c46046 the ABE firmware was updated with a version that
included several improvements, but also disabled the digital
microphone (DMIC) feature.  In order to support DMIC on devices like
the Blaze, an alternate firmware (and matching code) must be
configured.

This commit allows an alternate firmware using
CONFIG_SND_OMAP4_ABE_USE_ALT_FW.

Change-Id: I2fd4aa8d03be802722dca973a71435b9965e80ea
Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>
OMAP:ABE: Fix schedule tablet formatting

Fixed the formatting of the code when the MultiFrame is set to 0

change
= 0/*...*/;
to
= 0; /*...*/

No operational changes are made to this file

Change-Id: I6b49e0f66f2fad16e540968c6ca926e450c60bf5
Signed-off-by: Dan Murphy <dmurphy@ti.com>
ASoC: ABE: update to ABE firmware 09.51.

New features:
- SRC 44.1 to 48 for MM_DL port (CBPr or Ping/Pong)
- Split monitoring of ABE filters saturation
- Table for filter saturation 8 or 16 kHz

Change-Id: I469a477612d4c927516e2bc96ea07d672bfcf3e0
Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Signed-off-by: Chris Kelly <c-kelly@ti.com>
Signed-off-by: Barry Woodward <b-woodward@ti.com>
Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>
ASoC: ABE HAL: Change ABE port priority table for BT voice call

Up to now the VX ports had a higher priority than BT port.
When voice call starts or stops, the ABE reference clock
changes between Modem clock and ABE system clock.
This change can produce noise on the multimedia tone played in the same time.
To avoid that the BT needs to have the priority.
Indeed, the ABE ref clock will stay at ABE system clock
inside/outside voice call.
As Vx ports have ASRC there's no problem of clock drift.

Change-Id: Ie04fe6705e6c85fe3c83bf684717ae48a10a43e7
Signed-off-by: Francois Mazard <f-mazard@ti.com>
[Blaze] ASoC: OMAP4 - DMIC DAI driver

Add both legacy DMA and ABE support for Digital Microphones on the
OMAP4 platform.

Change-Id: Ib6681c51d78255ba94177821c570e4dd5021a243
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Chris Kelly <c-kelly@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>

Conflicts:
	sound/soc/omap/Kconfig
ASoC: DMIC: Implement Errata i653

Implement Errata i653: if the DMIC path is reset by SW_DMIC_RST, uplink
FIFO is correctly reset but the dma pending signal is kept asserted.
This can result in an invalid access by the host DMA to uplink FIFO.

The workaround involves:
- Enable channels:
   DMIC_CTRL.SW_DMIC_RST = 1
   Enable necessary channels
   DMIC_CTRL.SW_DMIC_RST = 0

- Disable channels:
   DMIC_CTRL.SW_DMIC_RST = 1
   Disable all channels
   DMIC_CTRL.SW_DMIC_RST = 0

Change-Id: I03766e32493322094fb48d9ae07a19d15695996a
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
HACK: ASoC: OMAP ABE: Save DL1 BE related gains

MM_EXT_DL gains were being lost when ABE was hitting OFF, because
they were not properly saved when DL1 last active BE was muted.

Save DL1 BE gains along with ABE context in order to avoid
losing their values when OFF is hit. Gain values are saved when
gains are muted. These gains were not properly muted if BT_VX_DL
or MM_EXT_DL port was enabled and DL2 path was active, since
PDM_DL1 port gets enabled(for DL1 or DL2) when ABE McPDM is started.

Change-Id: Ib0d658c65c134f7ee4baeb13f7e09f6299b1923a
Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com>
ASoC: OMAP ABE: Update ports in order to support 44.1 KHz

With new ABE release the driver can support now 44.1 on MM DL
and TONES DL port. For MM DL port a true interpolation is done.
For TONES DL the ratio 12/11 is used.

Change-Id: Ic433e1576e7c86b1477c1854816caf5cefdceeed
Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Signed-off-by: Chris Kelly <c-kelly@ti.com>
ASoC: OMAP ABE: Allow FE ports to be muted independently

To avoid muting a FE due an active BE update. Digital muting
control for FEs should be independent of the number of active BEs
and dependent only on active FEs updates.

Change-Id: I227231939f24e93ecee41043a11bcef2045915da
Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com>
ASoC: TWL6040: Configure Phoenix Audio at 88.2 only for 88.2 kHz

As with new release of ABE firmware the ABE is supporting 44.1kHz
we need to set Phoenix Audio clock to 96 kHz. Today this setting
is not well computed by the driver as it is associated to the
sample frequency

Change-Id: I46f432574f90140809c0ac0b2f393d386cbdb01b
Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Signed-off-by: Chris Kelly <c-kelly@ti.com>
ASoc: ABE VxREC: Create VxREC CPU DAI

VxREC DAI represents the Vx_REC input of the ROUTE_UL.
Vx_REC can be mono or stereo input even it mixes
different inputs such as Vx_UL, Vx_DL, TONES_DL and MM_DL

Change-Id: I7b67d7472bf500f89865953054f740844c1166a5
Signed-off-by: Francois Mazard <f-mazard@ti.com>
Signed-off-by: Pierre Moos <p-moos@ti.com>

Conflicts:
	sound/soc/omap/Kconfig
ASoc: ABE VxREC: fix voice UL/DL gains swapping

Change-Id: I301f41bff006b59985b2bcc2ada96082a4724d55
Signed-off-by: Francois Mazard <f-mazard@ti.com>
Signed-off-by: Pierre Moos <p-moos@ti.com>
Fix sound for tuna
ASoC: DSP: Fix BE link state and hw_params in debugfs

BE state and hw_params were incorrectly shown in DSP state debugfs,
it was showing FE's values instead.

Change-Id: Ib5afb1537824634208741b0b635a31152c5aaddd
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
OMAP4: clock: Fixing clock internal source selection for ABE ports

ABE ports need a mask of two bits in order to select the
correct internal source clock. This patch fix this mask that
was only one bit and was overlaping with source clock bits.

Change-Id: I8597efd9cec6707e815da39598a0adb7a3ce3c61
Signed-off-by: Israel Cepeda <icepeda@ti.com>