OMAPDSS: HDMI: Remove CEA audio infoframe definitions

CEA-861 is not of exclusive usage of HDMI (it is used also in DisplayPort).
Hence, utilize the definition provided in asound.h

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: Correcty typo in I2S definitions

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: Decouple wrapper enable and audio start

Decouple the enablement of the HDMI audio wrapper from audio start.
Otherwise, an audio FIFO underflow may occur. The audio wrapper
enablement is performed in the ASoC codec's prepare function in
order to have it ready when audio playback is started.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: OMAP4: Remove unneeded includes

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: Decouple HDMI audio from ASoC

Instead of having OMAPDSS HDMI audio code that depends on the
ASoC HDMI audio driver, use a new config option so that
potential users, including ASoC,  may select when needed.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: OMAP4: Expand configuration for IEC60958 audio

Provide more configuration parameters for IEC60958 audio. For this,
a new structure containing the relevant parameters is created. Some
of the parameters previously located in the I2S structure are moved
to the new IEC60958 struct to improve the logical organization.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: Relocate N/CTS calculations into generic HDMI driver

The N and CTS parameters are relevant to all HDMI implmentations and
not specific to a given IP. Hence, the calculation is relocated
into the generic HDMI driver.

Also, deep color is removed from the calculation until such feature
is supported by the HDMI driver. This is to avoid direct IP register
readings from the generic HDMI driver.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: Add an audio configuration function

The generic HDMI driver does not need to know about the specific
settings of the IP. Hence, it passes the audio configuration
and the IP library parses such configuration and sets the IP
accordingly. This patch introduces an IP-specific audio configuration
function. Also the DMA, format and core config functions are not
exposed to the generic HDMI driver anymore.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: Implement DSS driver interface for audio

Add support for audio in the HDMI panel driver using the DSS driver
audio interface.

A spinlock is used for the audio functions. This is because
the audio functions may be called while holding a lock; in such case,
the panel's driver is not suitable. Also, local interrupts are disabled
for increased security; functions should not take very long to return as
they mainly set registers.
ASoC: OMAP: HDMI: Select DSS HDMI audio support

This is to build support for HDMI audio as provided by DSS.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
ASoC: OMAP: HDMI: Change error values in HDMI CPU DAI

When getting the needed resources fails, return ENODEV. This is more
in line with other drivers do and it gives a more descriptive error.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
ASoC: OMAP: HDMI: Introduce codec

Introduce codec for HDMI. At the moment, this is a dummy codec. In the
future it will parse the EDID to modify the supported parameters, such
as the number of channels and the sample rates. At the moment, only
the Basic Audio configuration (as defined in the HDMI specification)
is reported to be supported by the codec.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
ASoC: OMAP: Update Kconfig and Makefile files for HDMI audio codec

Update Makefile and Kconfig to select and build the HDMI audio codec.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
ASoC: OMAP: HDMI: Rename codec and codec_dai names

This is required to work with the dummy codec for HDMI.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
ASoC: OMAP: HDMI: Update CPU DAI configuration and ops

Add operations to the CPU DAI. This is to configure the HDMI IP
using DSS functionality.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
ASoC: OMAP: HDMI: Expand supported sample rates

According to the HDMI specification, a source is permitted to
transmit L-PCM audio in the following sample rates: 32kHz, 44.1kHz,
48kHz, 88.2kHz, 96kHz, 176.4kHz or 192kHz.

The sink may not necessarily support all these sample rates. However
as the CPU DAI describes the HDMI source, it makes sense to
include them.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>