summaryrefslogtreecommitdiffstats
path: root/sound/soc/sti/uniperif.h
AgeCommit message (Collapse)AuthorFilesLines
2021-03-31ASoC: sti: uniperif: align function prototypesPierre-Louis Bossart1-2/+2
cppcheck warning: sound/soc/sti/uniperif_player.c:1049:24: style:inconclusive: Function 'uni_player_init' argument 2 names different: declaration 'uni_player' definition 'player'. [funcArgNamesDifferent] struct uniperif *player) ^ sound/soc/sti/uniperif.h:1375:24: note: Function 'uni_player_init' argument 2 names different: declaration 'uni_player' definition 'player'. struct uniperif *uni_player); ^ sound/soc/sti/uniperif_player.c:1049:24: note: Function 'uni_player_init' argument 2 names different: declaration 'uni_player' definition 'player'. struct uniperif *player) ^ sound/soc/sti/uniperif_reader.c:411:24: style:inconclusive: Function 'uni_reader_init' argument 2 names different: declaration 'uni_reader' definition 'reader'. [funcArgNamesDifferent] struct uniperif *reader) ^ sound/soc/sti/uniperif.h:1380:24: note: Function 'uni_reader_init' argument 2 names different: declaration 'uni_reader' definition 'reader'. struct uniperif *uni_reader); ^ sound/soc/sti/uniperif_reader.c:411:24: note: Function 'uni_reader_init' argument 2 names different: declaration 'uni_reader' definition 'reader'. struct uniperif *reader) ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Link: https://lore.kernel.org/r/20210326215927.936377-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-10ASoC: sti: uniperif: fix 'defined by not used' warningPierre-Louis Bossart1-1/+1
Fix W=1 warning. The table uni_tdm_hw is declared in a header included by multiple C file. This isn't really a good practice but for now using __maybe_unused makes the following warning go away. sound/soc/sti/sti_uniperif.c:12: sound/soc/sti/uniperif.h:1351:38: warning: ‘uni_tdm_hw’ defined but not used [-Wunused-const-variable=] 1351 | static const struct snd_pcm_hardware uni_tdm_hw = { | ^~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Link: https://lore.kernel.org/r/20200709162328.259586-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194Thomas Gleixner1-1/+1
Based on 1 normalized pattern(s): license terms gnu general public license gpl version 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 161 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528170027.447718015@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-06ASoC: STI: Fix null ptr deference in IRQ handlerArnaud Pouliquen1-0/+1
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>
2016-10-26ASoC: sti: reset refactoringArnaud Pouliquen1-0/+2
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>
2016-09-14ASoC: sti: suppress inappropriate DT fieldsArnaud Pouliquen1-16/+12
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>
2016-04-18ASoC: sti: select player for I2S/TDM TX busMoise Gergaud1-0/+1
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-12ASoC: sti: unip player tdm modeMoise Gergaud1-0/+11
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-12ASoC: sti: helper functions to fix tdm runtime paramsMoise Gergaud1-0/+6
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-12ASoC: sti: helper functions for unip tdm slots configurationMoise Gergaud1-0/+23
- sti_uniperiph_set_tdm_slot: store tdm slot config in unip context - sti_uniperiph_get_tdm_word_pos: configure unip tdm slots pos regs 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-12ASoC: sti: define tdm type & default tdm hw configMoise Gergaud1-1/+27
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-12ASoC: sti: rename unip player type into common player & reader typeMoise Gergaud1-5/+14
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-12ASoC: sti: macro for uniperif tdm regs accessMoise Gergaud1-0/+112
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-03-31ASoC: sti: correct typo errorsMoise Gergaud1-11/+11
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-07-29ASoC: uniperf: Add missing __iomem annotationLars-Peter Clausen1-1/+1
base referes to a iomem region, so it should have the __iomem annotation. Fixes the following warnings from sparse: sound/soc/sti/sti_uniperif.c:169:19: warning: incorrect type in assignment (different address spaces) sound/soc/sti/sti_uniperif.c:169:19: expected void *base sound/soc/sti/sti_uniperif.c:169:19: got void [noderef] <asn:2>* sound/soc/sti/uniperif_player.c:104:18: warning: incorrect type in argument 1 (different address spaces) sound/soc/sti/uniperif_player.c:104:18: expected void const volatile [noderef] <asn:2>*addr sound/soc/sti/uniperif_player.c:104:18: got void * [...] 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-16ASoC: sti: Add clock adjustement controlArnaud Pouliquen1-0/+2
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-16ASoC: sti: Add uniperipheral dai driverArnaud Pouliquen1-0/+9
ASoc uniperipheral dai driver that manages uniperipheral DAIs and registers associated generic dma engine platform. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16ASoC: sti: Add CPU DAI driver for captureArnaud Pouliquen1-0/+3
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>
2015-07-10ASoC: sti: Add CPU DAI driver for playbackArnaud Pouliquen1-0/+116
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-10ASoC: sti: Add uniperipheral header fileArnaud Pouliquen1-0/+1099
Add the Uniperipheral header file for uniperipheral IPs registers definition. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>