[alsa-devel] [PATCH 1/4] ASoC: pxa-ssp: enhance I2S and add Left_J support

Daniel Ribeiro drwyrm at gmail.com
Mon Jun 8 18:03:20 CEST 2009


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem
 assinada digitalmente
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20090608/5c566d6c/attachment.sig 


More information about the Alsa-devel mailing list