[alsa-devel] [PATCH 5/5] ASoC: atmel_ssc_dai: Enable shared FSYNC source in frame-slave mode
mirq-linux at rere.qmqm.pl
mirq-linux at rere.qmqm.pl
Thu Jul 25 20:24:27 CEST 2019
On Thu, Jul 25, 2019 at 03:02:34PM +0000, Codrin.Ciubotariu at microchip.com wrote:
> On 22.07.2019 21:27, Michał Mirosław wrote:
> > SSC driver allows only synchronous TX and RX. In slave mode for BCLK
> > it uses only one of TK or RK pin, but for LRCLK it configured separate
> > inputs from TF and RF pins. Allow configuration with common FS signal.
[...]
> > @@ -613,10 +607,30 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
> > return -EINVAL;
> > }
> >
> > - if (!atmel_ssc_cfs(ssc_p)) {
> > + if (atmel_ssc_cfs(ssc_p)) {
> > + /*
> > + * SSC provides LRCLK
> > + *
> > + * Both TF and RF are generated, so use them directly.
> > + */
> > + rcmr |= SSC_BF(RCMR_START, fs_edge);
> > + tcmr |= SSC_BF(TCMR_START, fs_edge);
> > + } else {
> > fslen = fslen_ext = 0;
> > rcmr_period = tcmr_period = 0;
> > fs_osync = SSC_FSOS_NONE;
> > + if (!ssc->shared_fs_pin) {
> > + rcmr |= SSC_BF(RCMR_START, fs_edge);
> > + tcmr |= SSC_BF(TCMR_START, fs_edge);
> > + } else if (ssc->clk_from_rk_pin) {
> > + /* assume RF is to be used when RK is used as BCLK input */
> > + /* Note: won't work correctly on SAMA5D2 due to errata */
> > + rcmr |= SSC_BF(RCMR_START, fs_edge);
> > + tcmr |= SSC_BF(TCMR_START, SSC_START_RECEIVE);
>
> Did you find a platform in which this mode works?
To be exact: according to the errata, TX is delayed improperly. So if you
use only RX (SSC side receives) direction, you're fine.
Best Regards,
Michał Mirosław
More information about the Alsa-devel
mailing list