linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] ASoC: Add STM32 I2S support
@ 2017-05-18 15:19 olivier moysan
  2017-05-18 15:19 ` [PATCH v4 1/3] dt-bindings: Document STM32 I2S bindings olivier moysan
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: olivier moysan @ 2017-05-18 15:19 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, mcoquelin.stm32,
	alexandre.torgue, alsa-devel, robh, mark.rutland, devicetree,
	linux-arm-kernel, kernel, linux-kernel, olivier.moysan
  Cc: arnaud.pouliquen, benjamin.gaignard

This patch-set handles the SPI/I2S IP on STM32 platforms.

It applies to STM32 platforms implementing version 2 of SPI/I2S IP like STM32H7 series.

The SPI/I2S block is a serial peripheral interface (SPI), which can also be configured to work on I2S/PCM mode.
ASoC STM32 I2S driver only supports this I2S/PCM mode.

The I2S/PCM interface can either support full duplex or half-duplex communication
(transmitter or receiver only). The change of mode requires to stop the interface.
This means that the two audio paths cannot be basically managed independently.

The driver supports playback and capture through a single bidirectionnal DAI. 
In the first version of the driver, playback and capture paths are made mutually exclusive.

A second patch introduces support of full duplex mode. 
In this implementation the interface is systematically configured in full-duplex mode
from hardware point of view. So, when managing a single audio path, the interface
is not configured as transmit or receive only, as it should be.
This restriction is handled by masking underrun/overrun errors from the unused path.

The I2S/PCM interface supports four audio standards:
I2S Philips standard, MSB justified standard, LSB justified standard, PCM standard
PCM standard is declined in two versions, PCM short and long,
according frame synchronization duration.

These standards can be mapped to ASoC standards as follows:
	- I2S: i2s
	- MSB justified standard: left_j
	- LSB justified standard: right_j
	- PCM short: dsp_a
PCM long format is not exposed as it does not match supported ASoC standards.

v3 -> v4
	- update example in dt bindings

olivier moysan (3):
  dt-bindings: Document STM32 I2S bindings
  ASoC: stm32: Add I2S driver
  ASoC: stm32: Add full duplex support to i2s

 .../devicetree/bindings/sound/st,stm32-i2s.txt     |  62 ++
 sound/soc/stm/Kconfig                              |   2 +-
 sound/soc/stm/Makefile                             |   4 +
 sound/soc/stm/stm32_i2s.c                          | 946 +++++++++++++++++++++
 4 files changed, 1013 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/sound/st,stm32-i2s.txt
 create mode 100644 sound/soc/stm/stm32_i2s.c

-- 
1.9.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-05-23 14:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-18 15:19 [PATCH v4 0/3] ASoC: Add STM32 I2S support olivier moysan
2017-05-18 15:19 ` [PATCH v4 1/3] dt-bindings: Document STM32 I2S bindings olivier moysan
2017-05-19 17:37   ` Applied "ASoC: stm32: Document STM32 I2S bindings" to the asoc tree Mark Brown
2017-05-23 14:26   ` [PATCH v4 1/3] dt-bindings: Document STM32 I2S bindings Rob Herring
2017-05-18 15:19 ` [PATCH v4 2/3] ASoC: stm32: Add I2S driver olivier moysan
2017-05-19 17:33   ` Mark Brown
2017-05-22 15:11     ` Olivier MOYSAN
2017-05-18 15:19 ` [PATCH v4 3/3] ASoC: stm32: Add full duplex support to i2s olivier moysan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).