Commit a90e6053baa61feed8b19a9f4cbec6b56479d1ba
Committed by
Mark Brown
1 parent
d6bead020d
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
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>
Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff
sound/soc/mxs/mxs-sgtl5000.c
... | ... | @@ -91,11 +91,13 @@ |
91 | 91 | .stream_name = "HiFi Playback", |
92 | 92 | .codec_dai_name = "sgtl5000", |
93 | 93 | .ops = &mxs_sgtl5000_hifi_ops, |
94 | + .playback_only = true, | |
94 | 95 | }, { |
95 | 96 | .name = "HiFi Rx", |
96 | 97 | .stream_name = "HiFi Capture", |
97 | 98 | .codec_dai_name = "sgtl5000", |
98 | 99 | .ops = &mxs_sgtl5000_hifi_ops, |
100 | + .capture_only = true, | |
99 | 101 | }, |
100 | 102 | }; |
101 | 103 |