summaryrefslogtreecommitdiffstats
path: root/sound/soc/sti/uniperif_reader.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: sti: Use snd_pcm_stop_xrun() helperTakashi Iwai2018-07-041-1/+1
| | | | | | | | | The XRUN trigger from the driver should be done via snd_pcm_stop_xrun(). It fixes the missing stream locking as a gratis, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: STI: Fix null ptr deference in IRQ handlerArnaud Pouliquen2017-04-061-4/+20
| | | | | | | | | | | | | | | With RTlinux a race condition has been found that leads to NULL ptr crash: - On CPU 0: uni_player_irq_handler is called to treat XRUN "(player->state == UNIPERIF_STATE_STOPPED)" is FALSE so status is checked, dev_err(player->dev, "FIFO underflow error detected") is printed and then snd_pcm_stream_lock should be called to lock stream for stopping. - On CPU 1: application stop and close the stream. Issue is that the stop and shutdown functions are executed while "FIFO underflow error detected" is printed. So when CPU 0 calls snd_pcm_stream_lock, player->substream is already null. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: STI: Fix reader substream pointer setArnaud Pouliquen2017-03-241-0/+3
| | | | | | | | reader->substream is used in IRQ handler for error case but is never set. Set value to pcm substream on DAI startup and clean it on dai shutdown. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sti: clean unused includeArnaud Pouliquen2016-10-261-3/+0
| | | | | Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sti: reset refactoringArnaud Pouliquen2016-10-261-14/+1
| | | | | | | Reset is common to player and reader, migrate function in sti_uniperif.c Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sti: fix errors managementArnaud Pouliquen2016-10-261-12/+13
| | | | | | | | | Add missing error messages. Propagate error of uni_reader_init and uni_reader_init. Add return at end of dev_err strings. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sti: suppress inappropriate DT fieldsArnaud Pouliquen2016-09-141-43/+3
| | | | | | | | | | Update to suppress some DT nodes that can be handled in driver using compatible string. "dai-name", "st,version"and "st,mode" are suppressed "st,tdm-mode" is added to handle TDM mode. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sti: unip reader tdm modeMoise Gergaud2016-04-121-61/+168
| | | | | | | | | | | | | | Here are the changes to enable reader 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. - 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>
* ASoC: sti: rename ST proprietary DT propertiesMoise Gergaud2015-11-191-1/+1
| | | | | | | | "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>
* ASoC: sti: remove wrong error messageMoise Gergaud2015-11-191-1/+0
| | | | | | 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>
* ASoC: sti: check return of of_property_readArnaud Pouliquen2015-09-101-1/+5
| | | | | | | | 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>
* ASoC: sti: sti_uniperiph_dai_create_ctrl() can be statickbuild test robot2015-07-171-2/+2
| | | | | Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sti: Add CPU DAI driver for captureArnaud Pouliquen2015-07-161-0/+362
Add code to manage Uniperipheral reader IP instances. These DAIs are dedicated to capture and support I2S and IEC modes. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>