linux/sound/soc/mxs
Fabio Estevam a90e6053ba ASoC: mxs-sgtl5000: Configure the dai_links as unidirectional
On a mx28 board, running "aplay -l" and "arecord -l" results in the following:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: mxssgtl5000 [mxs_sgtl5000], device 0: Playback sgtl5000-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: mxssgtl5000 [mxs_sgtl5000], device 1: Capture sgtl5000-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: mxssgtl5000 [mxs_sgtl5000], device 0: Playback sgtl5000-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: mxssgtl5000 [mxs_sgtl5000], device 1: Capture sgtl5000-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

,which is not correct because we got a capture device listed in aplay and a
playback device listed in arecord.

On mx28 there are two serial audio interface ports (SAIF0 and SAIF1) and each
one of them are unidirectional.

Allow to specify a dai link as 'playback_only' or 'capture_only', which suits
well for this case.

After this change we can correctly report the capabilities as follows:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: mxssgtl5000 [mxs_sgtl5000], device 0: HiFi Playback sgtl5000-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: mxssgtl5000 [mxs_sgtl5000], device 1: HiFi Capture sgtl5000-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Also tested playback and capture on the mx28evk board.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-01 16:29:27 +01:00
..
Kconfig ASoC: mxs: Use generic dmaengine PCM 2013-04-22 11:27:29 +01:00
Makefile ASoC: mxs: add asoc configuration files 2011-07-28 11:47:41 +01:00
mxs-pcm.c ASoC: mxs: move to use generic DMA helper 2013-05-13 09:55:28 +04:00
mxs-pcm.h ASoC: mxs: move to use generic DMA helper 2013-05-13 09:55:28 +04:00
mxs-saif.c Merge remote-tracking branch 'asoc/fix/mxs' into asoc-linus 2013-07-04 18:30:02 +01:00
mxs-saif.h ASoC: mxs: move to use generic DMA helper 2013-05-13 09:55:28 +04:00
mxs-sgtl5000.c ASoC: mxs-sgtl5000: Configure the dai_links as unidirectional 2013-09-01 16:29:27 +01:00