Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Miao <eric.y.miao@gmail.com>
To: Daniel Ribeiro <drwyrm@gmail.com>
Cc: alsa-devel@alsa-project.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>,
	pHilipp Zabel <philipp.zabel@gmail.com>
Subject: Re: [RFC] I2S and LEFT_J
Date: Thu, 18 Jun 2009 15:58:29 +0800	[thread overview]
Message-ID: <4A39F3A5.5030109@gmail.com> (raw)
In-Reply-To: <1245086420.24109.159.camel@brutus>

Daniel Ribeiro wrote:
> Em Seg, 2009-06-15 às 16:04 +0100, Mark Brown escreveu:
>>> For what it matters, the only difference on I2S/LEFT_J vs DSP_A/DSP_B
>>> should be the SSPSFRM duration as it is needed to emulate the LRCLK.
>> Assuming no extra bit clocks.  Extra bit clocks do something different
>> in I2S due to the fact that LRCLK falling edge is signifigcant.
> 
> Yes, assuming that we will not do the envelope thing.
> 
> But you have to consider that a codec that _requires_ 64 bits frames for
> 2*16bits I2S audio is not exactly I2S compliant.
> 
> Quoting the specifications:
> 
> "It isn't necessary for the transmitter to know how many bits the
> receiver can handle, nor does the receiver need to know how many bits
> are being transmitted.
> 
> When the system word length is is greater than the transmitter word
> length, the word is truncated (least significant data bits are set to
> '0') for data transmission. If the receiver is sent more bits than its
> word length, the bits after the LSB are ignored. On the other hand, if
> the receiver is sent fewer bits than its word length, the missing bits
> are set to zero internally. And so, the MSB has a fixed position,
> whereas the position of the LSB depends on the word length. The
> transmitter always sends the MSB of the next word one clock period after
> the WS changes."
> 
> 
> Anyway, my interpretation of the I2S specifications, is that we don't
> need to do this enveloping thing at all. Codecs that requires this are
> simply broken, and are _not_ considering LRCLK edges as they are
> supposed to.
> 
> And finally, if the codec does this enveloping thing, it can't work if
> PXA is slave of LRCLK. The PXA-SSP port is definitely not I2S compliant,
> as it just ignores the LRCLK falling edge. We can workaround this using
> network mode with 4 slots and with slots 1|3 active, but this implies
> knowing the sample/frame width in advance, which by itself is an I2S
> spec violation.
> 
> I have hope that Daniel Mack's codec, which supposedly only works with
> 64 bits frames _is_ I2S compliant, and he just got to the wrong
> conclusion that it needs 64 bits frames after a lot of trial and error,
> and failing to fix the real issue. (setting 16bits frames(DataSize(16))
> for 2*16bit samples is simply wrong).
> 
>>> (and of course, the fact that I2S/LEFT_J are stereo only and that
>>> network mode can't be supported)
>> You should be able to support at least modes using the first TDM
>> timeslot I'd have thought.
> 
> Right, I2S/LEFT_J can be networked with DSP_A/DSP_B pcm formats, but
> I2S/LEFT_J has to be the first slot.
> 
> 
> But...
> 
> Transmitter is sending 16 bits samples, and the receiver expecting 32
> bits samples. This is perfectly valid according to I2S, the receiver
> would append zeros to the LSBs of each sample.

Daniel,

Could you give me an example of how can I setup the I2S in-compatible
mode with S_16LE, 64bitfs with your current patch? Thanks.

  parent reply	other threads:[~2009-06-18  7:58 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03 12:33 [PATCH 1/4] ASoC: pxa-ssp: enhance I2S and add Left_J support Eric Miao
2009-06-03 13:18 ` Daniel Mack
2009-06-03 14:22   ` Eric Miao
2009-06-03 14:23     ` Mark Brown
2009-06-03 14:24     ` Daniel Mack
     [not found]   ` <37b631400906040207o169abbc2ob33100879ac68911@mail.gmail.com>
2009-06-04  9:44     ` Paul Shen
2009-06-05 17:26       ` Daniel Mack
2009-06-05 22:47         ` Mark Brown
2009-06-04 12:36 ` Mark Brown
2009-06-04 13:12   ` Daniel Mack
2009-06-06  8:26 ` Daniel Ribeiro
2009-06-09  9:39   ` Paul Shen
2009-06-09  9:54     ` Daniel Mack
2009-06-09 10:10     ` Daniel Ribeiro
2009-06-06 20:12 ` Mark Brown
2009-06-08 12:12   ` pHilipp Zabel
2009-06-08 12:40     ` Mark Brown
2009-06-08 15:58       ` pHilipp Zabel
2009-06-08 16:25         ` Daniel Ribeiro
2009-06-08 16:38         ` Mark Brown
2009-06-08 17:18           ` pHilipp Zabel
2009-06-08 17:41             ` Mark Brown
2009-06-08 18:59               ` pHilipp Zabel
2009-06-08 16:03       ` Daniel Ribeiro
2009-06-08 16:53         ` Mark Brown
2009-06-08 17:26           ` Daniel Ribeiro
2009-06-08 18:06             ` Mark Brown
2009-06-08 20:52               ` Daniel Ribeiro
2009-06-09  9:39                 ` Eric Miao
2009-06-09  9:41                   ` Eric Miao
2009-06-09  9:58                   ` Mark Brown
2009-06-09 11:40                     ` pHilipp Zabel
2009-06-10 22:24                   ` Daniel Ribeiro
2009-06-11  9:00                     ` Mark Brown
2009-06-11 15:13                       ` Daniel Mack
2009-06-11 13:34                     ` Eric Miao
2009-06-11 14:36                       ` [RFC] I2S and LEFT_J (was: ASoC: pxa-ssp: enhance I2S and add Left_J support) Daniel Ribeiro
2009-06-15  8:45                         ` Eric Miao
2009-06-15 14:57                           ` Daniel Ribeiro
2009-06-15 15:04                             ` Mark Brown
2009-06-15 17:20                               ` Daniel Ribeiro
2009-06-15 17:40                                 ` Daniel Mack
2009-06-16  2:11                                   ` Daniel Ribeiro
2009-06-15 18:00                                 ` Mark Brown
2009-06-18  7:58                                 ` Eric Miao [this message]
2009-06-18 12:30                                   ` [RFC] I2S and LEFT_J Daniel Ribeiro
2009-06-22 22:14                                     ` Daniel Mack
2009-06-27  0:28                                       ` Daniel Ribeiro
2009-07-01 12:17                                         ` Daniel Mack
2009-06-08 21:07           ` [RFC] Auto setup TDM when needed. Add frame_width and rx/tx masks to set_tdm_slots Daniel Ribeiro
2009-06-09  9:10             ` Mark Brown
2009-06-08 14:13     ` [PATCH 1/4] ASoC: pxa-ssp: enhance I2S and add Left_J support Eric Miao
2009-06-08 15:06       ` Mark Brown

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=4A39F3A5.5030109@gmail.com \
    --to=eric.y.miao@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=drwyrm@gmail.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=philipp.zabel@gmail.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