linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: <Codrin.Ciubotariu@microchip.com>
To: <mirq-linux@rere.qmqm.pl>
Cc: alsa-devel@alsa-project.org, alexandre.belloni@bootlin.com,
	tiwai@suse.com, lgirdwood@gmail.com,
	Ludovic.Desroches@microchip.com, broonie@kernel.org,
	perex@perex.cz, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/5] ASoC: atmel_ssc_dai: Enable shared FSYNC source in frame-slave mode
Date: Fri, 26 Jul 2019 10:33:29 +0000	[thread overview]
Message-ID: <6fdbcec1-346f-9ebf-34e7-83b0ceaba404@microchip.com> (raw)
In-Reply-To: <20190725182427.GA16245@qmqm.qmqm.pl>

On 25.07.2019 21:24, mirq-linux@rere.qmqm.pl wrote:
> External E-Mail
> 
> 
> On Thu, Jul 25, 2019 at 03:02:34PM +0000, Codrin.Ciubotariu@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.

I know, but there are other platforms with SSC, which don't have this 
errata, like sam9x35 or sama5d3. Have you tested this mode, RK input, RF 
input, RD starts on edge detect, TF input, TD starts synchronously with 
receiver?

Best regards,
Codrin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-07-26 10:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 18:27 [PATCH 0/5] ASoC: atmel: extend SSC support Michał Mirosław
2019-07-22 18:27 ` [PATCH 1/5] ASoC: atmel: enable SSC_PCM_DMA in Kconfig Michał Mirosław
2019-07-23 13:36   ` Codrin.Ciubotariu
2019-07-23 14:26     ` Codrin.Ciubotariu
2019-07-23 16:43     ` mirq-linux
2019-07-23 17:27       ` Codrin.Ciubotariu
2019-07-23 18:39       ` Alexandre Belloni
2019-07-23 23:25         ` mirq-linux
2019-07-25 15:25           ` Codrin.Ciubotariu
2019-08-23 15:09           ` Alexandre Belloni
2019-07-23 17:18   ` Mark Brown
2019-07-22 18:27 ` [PATCH 3/5] ASoC: atmel_ssc_dai: implement left-justified data mode Michał Mirosław
2019-07-25 13:15   ` Codrin.Ciubotariu
2019-07-22 18:27 ` [PATCH 2/5] ASoC: atmel_ssc_dai: rework DAI format configuration Michał Mirosław
2019-07-24 10:35   ` Codrin.Ciubotariu
2019-07-24 11:15     ` mirq-linux
2019-07-24 12:54       ` Codrin.Ciubotariu
2019-07-22 18:27 ` [PATCH 4/5] ASoC: atmel_ssc_dai: split TX/RX FS constants Michał Mirosław
2019-07-25 13:28   ` Codrin.Ciubotariu
2019-07-22 18:27 ` [PATCH 5/5] ASoC: atmel_ssc_dai: Enable shared FSYNC source in frame-slave mode Michał Mirosław
2019-07-25 15:02   ` Codrin.Ciubotariu
2019-07-25 18:24     ` mirq-linux
2019-07-26 10:33       ` Codrin.Ciubotariu [this message]
2019-07-26 12:08         ` mirq-linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6fdbcec1-346f-9ebf-34e7-83b0ceaba404@microchip.com \
    --to=codrin.ciubotariu@microchip.com \
    --cc=Ludovic.Desroches@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).