-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Antonio Ospite escreveu:
> I talked with Philipp Zabel about your changes, and obviously he said
> that this change is way better than my hackish solution but it is not
> _right_ yet.

        Philipp code is wrong, not mine. ;)

> <pH5> ao2: that isn't universally good either, because on my device
>       they used TISSP mode, not PSP

        PSP allows you to set almost any configuration on the port, using TISSP
is not necessary. TISSP behaviour may be "emulated" by PSP, see below.

> <pH5> also you don't clear SSPSP in i2s emulation mode
>       anymore, which according to pxa27x docs is needed.

        Where on the manual is this said?? The manual says:

[quote]
        The following bit fields _must_be_configured_:
         * SSCR0[EDSS] = 0b1 (32-bit data)
         * SSCR0[FRF] = 0b11 (PSP format)
         * SSCR0[DSS] = 0b1111 (32-bit data)

        The example below shows the use of the _recommended_settings_:
         * SSCR0 = 0x001000BF (Only SSCR0[NCS] or SSCR0[ECS] bit fields
settings are optional)
         * SSCR1 = 0x203C3C03 (SSCR1[SCLKDIR] and SSCR1[SFRMDIR] must be
cleared, all other bit fields settings are optional.)
         * SSPSP = 0x02100000 (all bit fields must be cleared except:
FSRT = 1 and SFRMWDTH = 16, DMYSTART=0,1)
[/quote]

        Please, note that the _mandatory_ bits are expressed on the first
paragraph. The second paragraph shows the _recommended_ settings, values
on the second paragraph are not mandatory. We are using I2S emulation
with SCLKDIR and SFRMDIR *set* (pxa is _slave_) and it is working just fine.

        Philipp's device is _not_using_i2s_emulation_. DSS=32bit and EDSS are
_mandatory_ for I2S (I2S always use 32bit frames).
        Changes to EDSS|DSS on ssp_set_dai_fmt are useless (without my patch)
because they are overriden by ssp_hw_params. Philipp can try this by
removing EDSS|DSS from ssp_set_dai_fmt and i am 100% sure that his
device will still work.

        From the PXA manual, TISSP:
        1. The first bit (MSB) is transmitted one bitclk after SFRM is asserted.
        2. Output transitions occur on the rising edge of SSPSCLKx while data
sampling occurs on the falling edge.

        The same may be accomplished with PSP by:
        1. SFRMWDTH=[1-(anything less than the frame size)], DMYSTRT=1
        2. SCMODE=[1-2].

        Philipp, could you please try to set your dai_fmt to
SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_IF and
report the results?? Hope this helps. ;)

- --
Daniel Ribeiro
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIRdZSw3OYl0G0liQRAuYVAJwPCJWYH+YcjIm/rsAFi1jQHep7vwCfZVQu
lcRipFc+AnFV1d15gtikXJw=
=VFDU
-----END PGP SIGNATURE-----

Reply via email to