Commit Graph

15 Commits

Author SHA1 Message Date
Wei Yongjun 7d267ddfd5 ASoC: sti: fix return value check in uni_player_parse_dt_audio_glue()
In case of error, the function syscon_regmap_lookup_by_phandle() returns
ERR_PTR() and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-13 16:37:19 +01:00
Moise Gergaud 3ee15cac90 ASoC: sti: select player for I2S/TDM TX bus
By default, player#0 is connected to I2S/TDM TX bus.
This patch connects player#1 to I2S/TDM TX bus.

Signed-off-by: Moise Gergaud <moise.gergaud@st.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-04-18 11:04:55 +01:00
Moise Gergaud 8d8b1e2edd ASoC: sti: unip player tdm mode
here are the changes to enable player tdm mode:
- When TDM_ENABLE is set to 1, the i2s format should be automatically
configured. Unfortunately this is not the case (HW bug). Then, we shall
force DATA_SIZE setting.
- Compute the transfer size for tdm mode: transfer size = user frame size
- Manage tdm slots configuration given in DT.
- Don't use mclk-fs when unip in tdm mode; use tdm slot config to compute
frame size and to set mclk rate.
- Refine the hw param (channels & format) according to tdm slot config.

Signed-off-by: Moise Gergaud <moise.gergaud@st.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-04-12 04:59:09 +01:00
Moise Gergaud 5295a0dc31 ASoC: sti: rename unip player type into common player & reader type
Signed-off-by: Moise Gergaud <moise.gergaud@st.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-04-12 02:58:59 +01:00
Mark Brown 14418aa7d4 Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sh', 'asoc/topic/ssm2518' and 'asoc/topic/sti' into asoc-next 2015-12-23 00:23:51 +00:00
Moise Gergaud 0d3f3c9a48 ASoC: sti: set iec958 channel status sampling freq
Previously, the iec958 channels status sampling freq was set only if not
already set. It means that it is not updated for next PCM sessions.
With this patch, we ensure the iec958 channels status sampling freq is set
to the runtime rate for each PCM session.

Signed-off-by: Moise Gergaud <moise.gergaud@st.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-25 12:34:50 +00:00
Moise Gergaud 36a65e2072 ASoC: sti: set player private data
Set substream player private data.
substream player private data is used in uni_player_irq_handler to lock,
stop & unlock the stream when interrupt indicates underflow/overflow.
If not set, then segmentation fault occurs.

Signed-off-by: Moise Gergaud <moise.gergaud@st.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-19 17:49:35 +00:00
Moise Gergaud f9f51973d3 ASoC: sti: rename ST proprietary DT properties
"st," prefix has been added for ST proprietary DT properties.

Signed-off-by: Moise Gergaud <moise.gergaud@st.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-19 17:49:35 +00:00
Arnaud Pouliquen 3a0e27d84b ASoC: sti: check return of of_property_read
Add check on of_property_read to return error when
DT required property is not defined.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-10 11:11:18 +01:00
Arnaud Pouliquen 36cc093520 ASoC: sti: Add IEC control
Add control to configure IEC60958 settings.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:51:33 +01:00
Lars-Peter Clausen 85cf604edc ASoC: uniperf: Staticise local symbols
uni_player_dai_ops is not used outside of this file so it should be static.
Fixes the following sparse warning:

	sound/soc/sti/uniperif_player.c:959:30: warning: symbol
		'uni_player_dai_ops' was not declared. Should it be static?

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 15:07:16 +01:00
kbuild test robot f2da454226 ASoC: sti: sti_uniperiph_dai_create_ctrl() can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 01:08:47 +01:00
Arnaud Pouliquen fa050796b3 ASoC: sti: Add clock adjustement control
Add capability to adjust player clock, for clocks drift management.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:38:24 +01:00
Arnaud Pouliquen ed6c75f233 ASoC: sti: minor corrections for uniplayer
Minor corrections after code review.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:38:23 +01:00
Arnaud Pouliquen 76c2145ded ASoC: sti: Add CPU DAI driver for playback
Add code to manage Uniperipheral player IP instances.
These DAIs are dedicated to playback and support I2S and IEC modes.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-10 18:36:26 +01:00