All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Ribeiro <drwyrm@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, Eric Miao <eric.y.miao@gmail.com>,
	linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>,
	pHilipp Zabel <philipp.zabel@gmail.com>
Subject: Re: [PATCH 1/4] ASoC: pxa-ssp: enhance I2S and add Left_J support
Date: Mon, 08 Jun 2009 13:03:20 -0300	[thread overview]
Message-ID: <1244477000.30582.72.camel@brutus> (raw)
In-Reply-To: <20090608124045.GE7858@sirena.org.uk>


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

Em Seg, 2009-06-08 às 13:40 +0100, Mark Brown escreveu:
> > set_sample_width or set_frame_width?
> 
> I'm inclined to go with sample here since it seems harder for the
> machine drivers to get wrong but I've not really thought it through yet?

But sample wouldn't cover all cases. eg, magician and ezx uses the same
sample size, but magician needs 16bit frames and ezx 32bits frames.

Just to confirm that I'm understanding the terminology here..
Sample size is SNDRV_PCM_FORMAT_*, and frame size is the actual distance
in clocks between each SSPFRM assertion. Is this correct?

> > I'd prefer a separate operation over a parameter to set_tdm_slot because
> > in my setup I just need to force the (SSP) frame width to 16 bits.
> > Enabling network mode and calling set_tdm_slot(..,1,1) wouldn't be
> > necessary at all, then.
> 
> OTOH I don't really see much difference between the two cases - it's
> just an extra couple of parameters on the end of the call.  That said,
> it'd be much nicer if the driver were able to just do the right thing
> for DSP mode unless explicitly configured, there's not the issue you
> have with I2S where extra clocks would change the offset of the second
> channel within a stereo frame so it's much easier.

I agree with pHilipp, I don't need to set network mode for normal
operation, but i want to be able to use real network mode.

Using set_tdm_slot to setup this also seems awkward, because the dma
configuration to use is also affected by the frame size.


And finally, set_tdm_mode doesn't cover all use cases, I may want to
receive on a timeslot and keep the TX line high impedance, or I may want
to use a different timeslot for TX...

This is used on ezx to record GSM audio. I want the TX line to remain
high impedance, while I sniff BP <-> codec data.

This also brings another issue.. We are enforcing network mode on ALL
modes (with Eric's recent I2S patch), and at the same time we want
RWOT(Receive Without Transmit) always enabled. But the manual says(Table
185): "RWOT must not be used when SSCR0_x[MOD] is set"


My suggestion here is to make a clear distinction between normal mode
and network mode. We should not abuse SSCR0_MOD when we don't need it.
We should not require the machine driver to call set_tdm_slot when it
doesn't need to. And for frame sizes that really need SSCR0_MOD to be
set we should issue a warning telling that network mode was
"automatically" enabled.

-- 
Daniel Ribeiro

[-- Attachment #1.2: Esta é uma parte de mensagem assinada digitalmente --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2009-06-08 16:04 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 [this message]
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                                 ` [RFC] I2S and LEFT_J Eric Miao
2009-06-18 12:30                                   ` 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=1244477000.30582.72.camel@brutus \
    --to=drwyrm@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=eric.y.miao@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 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.