All of lore.kernel.org
 help / color / mirror / Atom feed
* Question: PCM short and long sync formats
@ 2012-03-21 10:21 Omair Mohammed Abdullah
  2012-03-21 11:51 ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Omair Mohammed Abdullah @ 2012-03-21 10:21 UTC (permalink / raw)
  To: alsa-devel, broonie

I was looking for PCM short frame sync and PCM long frame sync, but they 
are not present in soc-dai.h (FORMAT_MASK). Is there a way to derive 
them from other formats or should I just add them?

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

* Re: Question: PCM short and long sync formats
  2012-03-21 10:21 Question: PCM short and long sync formats Omair Mohammed Abdullah
@ 2012-03-21 11:51 ` Mark Brown
  2012-03-26  9:06   ` Omair Mohammed Abdullah
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2012-03-21 11:51 UTC (permalink / raw)
  To: Omair Mohammed Abdullah; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 354 bytes --]

On Wed, Mar 21, 2012 at 03:51:36PM +0530, Omair Mohammed Abdullah wrote:

> I was looking for PCM short frame sync and PCM long frame sync, but
> they are not present in soc-dai.h (FORMAT_MASK). Is there a way to
> derive them from other formats or should I just add them?

What do you mean when you say "PCM short frame sync" and "PCM long
frame sync"?

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: Question: PCM short and long sync formats
  2012-03-21 11:51 ` Mark Brown
@ 2012-03-26  9:06   ` Omair Mohammed Abdullah
  2012-03-26 10:26     ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Omair Mohammed Abdullah @ 2012-03-26  9:06 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel

On Wednesday 21 March 2012 05:21 PM, Mark Brown wrote:
> On Wed, Mar 21, 2012 at 03:51:36PM +0530, Omair Mohammed Abdullah wrote:
>
>> I was looking for PCM short frame sync and PCM long frame sync, but
>> they are not present in soc-dai.h (FORMAT_MASK). Is there a way to
>> derive them from other formats or should I just add them?
>
> What do you mean when you say "PCM short frame sync" and "PCM long
> frame sync"?

Sorry for the late reply, I was away.

What I mean by short/long frame sync is: the frame sync lasts for 1 
bit/1 word wide.

Eg.: For short frame sync, we get a frame sync signal for 1 clock before 
the first bit on the RX/TX.

It is different from I2S mode where the frame sync is inverted and the 
transition starts 1 clock before the bits and lasts till bit 1.

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

* Re: Question: PCM short and long sync formats
  2012-03-26  9:06   ` Omair Mohammed Abdullah
@ 2012-03-26 10:26     ` Mark Brown
  2012-03-26 12:07       ` Omair Mohammed Abdullah
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2012-03-26 10:26 UTC (permalink / raw)
  To: Omair Mohammed Abdullah; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 780 bytes --]

On Mon, Mar 26, 2012 at 02:36:53PM +0530, Omair Mohammed Abdullah wrote:
> On Wednesday 21 March 2012 05:21 PM, Mark Brown wrote:

> >What do you mean when you say "PCM short frame sync" and "PCM long
> >frame sync"?

> Sorry for the late reply, I was away.

> What I mean by short/long frame sync is: the frame sync lasts for 1
> bit/1 word wide.

> Eg.: For short frame sync, we get a frame sync signal for 1 clock
> before the first bit on the RX/TX.

> It is different from I2S mode where the frame sync is inverted and
> the transition starts 1 clock before the bits and lasts till bit 1.

I'm sorry but I still have no idea what you're talking about.  You've
described PCM mode but not explained what "short frame sync" and "long
frame sync" mode are.  

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: Question: PCM short and long sync formats
  2012-03-26 10:26     ` Mark Brown
@ 2012-03-26 12:07       ` Omair Mohammed Abdullah
  2012-03-26 12:08         ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Omair Mohammed Abdullah @ 2012-03-26 12:07 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel

On Monday 26 March 2012 03:56 PM, Mark Brown wrote:
> On Mon, Mar 26, 2012 at 02:36:53PM +0530, Omair Mohammed Abdullah wrote:
>> On Wednesday 21 March 2012 05:21 PM, Mark Brown wrote:
>
>>> What do you mean when you say "PCM short frame sync" and "PCM long
>>> frame sync"?
>
>> Sorry for the late reply, I was away.
>
>> What I mean by short/long frame sync is: the frame sync lasts for 1
>> bit/1 word wide.
>
>> Eg.: For short frame sync, we get a frame sync signal for 1 clock
>> before the first bit on the RX/TX.
>
>> It is different from I2S mode where the frame sync is inverted and
>> the transition starts 1 clock before the bits and lasts till bit 1.
>
> I'm sorry but I still have no idea what you're talking about.  You've
> described PCM mode but not explained what "short frame sync" and "long
> frame sync" mode are.

This diagram may explain things better:
http://picpaste.com/pcm_fs-7dBlrkuW.png

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

* Re: Question: PCM short and long sync formats
  2012-03-26 12:07       ` Omair Mohammed Abdullah
@ 2012-03-26 12:08         ` Mark Brown
  2012-03-26 13:29           ` Omair Mohammed Abdullah
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2012-03-26 12:08 UTC (permalink / raw)
  To: Omair Mohammed Abdullah; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 515 bytes --]

On Mon, Mar 26, 2012 at 05:37:15PM +0530, Omair Mohammed Abdullah wrote:
> On Monday 26 March 2012 03:56 PM, Mark Brown wrote:

> >I'm sorry but I still have no idea what you're talking about.  You've
> >described PCM mode but not explained what "short frame sync" and "long
> >frame sync" mode are.

> This diagram may explain things better:
> http://picpaste.com/pcm_fs-7dBlrkuW.png

Sorry, that's not really clarifying things.  It looks like "long frame
sync" is just I2S but presumably there's some difference?

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: Question: PCM short and long sync formats
  2012-03-26 12:08         ` Mark Brown
@ 2012-03-26 13:29           ` Omair Mohammed Abdullah
  2012-03-26 13:33             ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Omair Mohammed Abdullah @ 2012-03-26 13:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel

On Monday 26 March 2012 05:38 PM, Mark Brown wrote:
> On Mon, Mar 26, 2012 at 05:37:15PM +0530, Omair Mohammed Abdullah wrote:
>> On Monday 26 March 2012 03:56 PM, Mark Brown wrote:
>
>>> I'm sorry but I still have no idea what you're talking about.  You've
>>> described PCM mode but not explained what "short frame sync" and "long
>>> frame sync" mode are.
>
>> This diagram may explain things better:
>> http://picpaste.com/pcm_fs-7dBlrkuW.png
>
> Sorry, that's not really clarifying things.  It looks like "long frame
> sync" is just I2S but presumably there's some difference?

Yes, in I2S mode, according to the spec I have, the frame sync leads the 
MSB of the data by 1 bit clock cycle. Whereas the 'long frame sync' mode 
starts with the MSB of the data.

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

* Re: Question: PCM short and long sync formats
  2012-03-26 13:29           ` Omair Mohammed Abdullah
@ 2012-03-26 13:33             ` Mark Brown
  2012-03-27  3:32               ` [PATCH] ASoC: Added PCM short and long frame " Omair Mohammed Abdullah
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2012-03-26 13:33 UTC (permalink / raw)
  To: Omair Mohammed Abdullah; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 628 bytes --]

On Mon, Mar 26, 2012 at 06:59:43PM +0530, Omair Mohammed Abdullah wrote:
> On Monday 26 March 2012 05:38 PM, Mark Brown wrote:

> >Sorry, that's not really clarifying things.  It looks like "long frame
> >sync" is just I2S but presumably there's some difference?

> Yes, in I2S mode, according to the spec I have, the frame sync leads
> the MSB of the data by 1 bit clock cycle. Whereas the 'long frame
> sync' mode starts with the MSB of the data.

This is probably left justified mode but I'm really not clear what
your question is here.  Please ask a *specific* question, with reference
to what you find unclear in the code.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* [PATCH] ASoC: Added PCM short and long frame sync formats
  2012-03-26 13:33             ` Mark Brown
@ 2012-03-27  3:32               ` Omair Mohammed Abdullah
  2012-03-27  3:34                 ` Omair Mohammed Abdullah
  0 siblings, 1 reply; 11+ messages in thread
From: Omair Mohammed Abdullah @ 2012-03-27  3:32 UTC (permalink / raw)
  To: alsa-devel; +Cc: broonie, lrg, Omair Mohammed Abdullah

The PCM short frame sync sends a short (1 clock length) sync signal before the
MSB of data. The PCM long frame sync sends a 1 word length sync signal along
with the data.

Signed-off-by: Omair Mohammed Abdullah <omair.m.abdullah@linux.intel.com>
---
 include/sound/soc-dai.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index c429f24..dc94b25 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -32,6 +32,8 @@ struct snd_soc_dapm_widget;
 #define SND_SOC_DAIFMT_DSP_B		5 /* L data MSB during FRM LRC */
 #define SND_SOC_DAIFMT_AC97		6 /* AC97 */
 #define SND_SOC_DAIFMT_PDM		7 /* Pulse density modulation */
+#define SND_SOC_DAIFMT_SHORT_SYNC	8 /* FRM for 1 clock before MSB */
+#define SND_SOC_DAIFMT_LONG_SYNC	9 /* FRM for 1 word starting with MSB */
 
 /* left and right justified also known as MSB and LSB respectively */
 #define SND_SOC_DAIFMT_MSB		SND_SOC_DAIFMT_LEFT_J
-- 
1.7.4.1

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

* Re: [PATCH] ASoC: Added PCM short and long frame sync formats
  2012-03-27  3:32               ` [PATCH] ASoC: Added PCM short and long frame " Omair Mohammed Abdullah
@ 2012-03-27  3:34                 ` Omair Mohammed Abdullah
  2012-03-27  7:33                   ` Lars-Peter Clausen
  0 siblings, 1 reply; 11+ messages in thread
From: Omair Mohammed Abdullah @ 2012-03-27  3:34 UTC (permalink / raw)
  To: Omair Mohammed Abdullah; +Cc: alsa-devel, broonie, lrg

On Tuesday 27 March 2012 09:02 AM, Omair Mohammed Abdullah wrote:
> The PCM short frame sync sends a short (1 clock length) sync signal before the
> MSB of data. The PCM long frame sync sends a 1 word length sync signal along
> with the data.
>
> Signed-off-by: Omair Mohammed Abdullah<omair.m.abdullah@linux.intel.com>
> ---
>   include/sound/soc-dai.h |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
> index c429f24..dc94b25 100644
> --- a/include/sound/soc-dai.h
> +++ b/include/sound/soc-dai.h
> @@ -32,6 +32,8 @@ struct snd_soc_dapm_widget;
>   #define SND_SOC_DAIFMT_DSP_B		5 /* L data MSB during FRM LRC */
>   #define SND_SOC_DAIFMT_AC97		6 /* AC97 */
>   #define SND_SOC_DAIFMT_PDM		7 /* Pulse density modulation */
> +#define SND_SOC_DAIFMT_SHORT_SYNC	8 /* FRM for 1 clock before MSB */
> +#define SND_SOC_DAIFMT_LONG_SYNC	9 /* FRM for 1 word starting with MSB */
>
>   /* left and right justified also known as MSB and LSB respectively */
>   #define SND_SOC_DAIFMT_MSB		SND_SOC_DAIFMT_LEFT_J

What I am looking for is something like this. But 
SND_SOC_DAIFMT_SHORT_SYNC might be the same as SND_SOC_DAIFMT_DSP_A.

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

* Re: [PATCH] ASoC: Added PCM short and long frame sync formats
  2012-03-27  3:34                 ` Omair Mohammed Abdullah
@ 2012-03-27  7:33                   ` Lars-Peter Clausen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars-Peter Clausen @ 2012-03-27  7:33 UTC (permalink / raw)
  To: Omair Mohammed Abdullah; +Cc: alsa-devel, broonie, lrg

On 03/27/2012 05:34 AM, Omair Mohammed Abdullah wrote:
> On Tuesday 27 March 2012 09:02 AM, Omair Mohammed Abdullah wrote:
>> The PCM short frame sync sends a short (1 clock length) sync signal before the
>> MSB of data. The PCM long frame sync sends a 1 word length sync signal along
>> with the data.
>>
>> Signed-off-by: Omair Mohammed Abdullah<omair.m.abdullah@linux.intel.com>
>> ---
>>   include/sound/soc-dai.h |    2 ++
>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
>> index c429f24..dc94b25 100644
>> --- a/include/sound/soc-dai.h
>> +++ b/include/sound/soc-dai.h
>> @@ -32,6 +32,8 @@ struct snd_soc_dapm_widget;
>>   #define SND_SOC_DAIFMT_DSP_B		5 /* L data MSB during FRM LRC */
>>   #define SND_SOC_DAIFMT_AC97		6 /* AC97 */
>>   #define SND_SOC_DAIFMT_PDM		7 /* Pulse density modulation */
>> +#define SND_SOC_DAIFMT_SHORT_SYNC	8 /* FRM for 1 clock before MSB */
>> +#define SND_SOC_DAIFMT_LONG_SYNC	9 /* FRM for 1 word starting with MSB */
>>
>>   /* left and right justified also known as MSB and LSB respectively */
>>   #define SND_SOC_DAIFMT_MSB		SND_SOC_DAIFMT_LEFT_J
> 
> What I am looking for is something like this. But 
> SND_SOC_DAIFMT_SHORT_SYNC might be the same as SND_SOC_DAIFMT_DSP_A.

Yes it is. And if you really only have two slots your long sync is
SND_SOC_DAIFMT_LEFT_J, but with the bit clock inverted.

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

end of thread, other threads:[~2012-03-27  7:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-21 10:21 Question: PCM short and long sync formats Omair Mohammed Abdullah
2012-03-21 11:51 ` Mark Brown
2012-03-26  9:06   ` Omair Mohammed Abdullah
2012-03-26 10:26     ` Mark Brown
2012-03-26 12:07       ` Omair Mohammed Abdullah
2012-03-26 12:08         ` Mark Brown
2012-03-26 13:29           ` Omair Mohammed Abdullah
2012-03-26 13:33             ` Mark Brown
2012-03-27  3:32               ` [PATCH] ASoC: Added PCM short and long frame " Omair Mohammed Abdullah
2012-03-27  3:34                 ` Omair Mohammed Abdullah
2012-03-27  7:33                   ` Lars-Peter Clausen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.