Commit graph

9 commits

Author SHA1 Message Date
Maxime Ripard 560bfe774f
ASoC: sun8i-codec: Invert Master / Slave condition
The current code had the condition backward when checking if the codec
should be running in slave or master mode.

Fix it, and make the comment a bit more readable.

Fixes: 36c684936f ("ASoC: Add sun8i digital audio codec")
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: <stable@vger.kernel.org>
2017-11-08 18:25:48 +00:00
Bhumika Goyal 92ff5d085e ASoC: sunxi: make snd_soc_codec_driver structures as const
Declare snd_soc_codec_driver structures as const as they are either
passed as an argument to the function snd_soc_register_codec or stored as
reference in field codec of type sun4i_codec_quirks. Both the fucntion
argument and the codec field are of type const, so declare the
structures with this property as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-07 12:33:51 +01:00
Gustavo A. R. Silva fe49cd980f ASoC: sun8i-codec: constify snd_soc_dai_ops structure
This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17 16:16:06 +01:00
Mylène Josserand 9123aa8645 ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
Update the driver to use SND_SOC_DAPM_AIF_IN instead of
SND_SOC_DAPM_DAC.
Rename the interface's widgets to be more precise on which slot
the interface is connected.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 18:10:51 +00:00
Mylène Josserand 80405d44c3 ASoC: sun8i-codec: Fix space on audio-routing widget
An unwanted space is present in an audio widget's name on the dapm
routing. It causes an error on the recognition of this widget (error:
("no dapm match for AIF1 Slot 0 Right").

Remove the space fixes it.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 18:10:51 +00:00
Mylène Josserand fa22ca4f90 ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
SOC_MIXER_ARRAY is a simplified function of SND_SOC_DAPM_MIXER
which handles automatically the ARRAY_SIZE of controls.

Update the driver to use SOC_MIXER_ARRAY.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 14:17:53 +01:00
Mylène Josserand ca14da6e61 ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE
Update the driver to use the new SOC_DAPM_DOUBLE definition
on the digital DAC mixer.
Update the names accordingly as, when they are shared, the
controls are not prefixed with the widget's name anymore.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 14:17:49 +01:00
Mylène Josserand 4aa8146c89 ASoC: sun8i-codec: Remove analog "HP" widget
The "HP" widget is already present and take part to
the analog part (sun8i-codec-analog).

Remove it from the digital part as it is unnecessary.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 14:17:44 +01:00
Mylène Josserand 36c684936f ASoC: Add sun8i digital audio codec
Add the sun8i audio codec which handles the digital register of
A33 codec.
The driver handles only the basic playback from the DAC to headphones.
All other features (microphone, capture, etc) will be added later.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-03 13:02:06 +01:00