* About iMX6SL sign extension of SSI Receive Configuration Register (SSIx_SRCR)
@ 2015-03-09 9:09 Xuebing Wang
2015-03-10 2:33 ` Nicolin Chen
0 siblings, 1 reply; 2+ messages in thread
From: Xuebing Wang @ 2015-03-09 9:09 UTC (permalink / raw)
To: alsa-devel, nicoleotsuka; +Cc: niranjan Patil, markus.lindroth, richard Jiang
Hi Nicolin and community,
iMX6SL reference manual section "48.9.8 SSI Receive Configuration
Register (SSIx_SRCR)" says about sign extension.
Below is a quote from iMX6SL reference manual:
-------------------------------------------------------------
Receive Data Extension. This control bit allows SSI to store the
received data word in sign extended form.
This bit affects data storage only in case received data is LSB aligned
(SRCR[9]=1)
0 OFF — Sign extension turned off.
1 ON — Sign extension turned on.
-------------------------------------------------------------
After I receive data (in the format of S16_LE) from SSI/I2S, I got data
like 0x7FFF or 0x77d2. Are they supposed to be 0xFFFF or 0xF7d2?
After setting bit 10 (RXEXT) of SSIx_SRCR, I still get 0x7FFF or 0x77d2.
-- Note: SRCR[9] is 1.
Any suggestions? Thanks.
--
Xuebing
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: About iMX6SL sign extension of SSI Receive Configuration Register (SSIx_SRCR)
2015-03-09 9:09 About iMX6SL sign extension of SSI Receive Configuration Register (SSIx_SRCR) Xuebing Wang
@ 2015-03-10 2:33 ` Nicolin Chen
0 siblings, 0 replies; 2+ messages in thread
From: Nicolin Chen @ 2015-03-10 2:33 UTC (permalink / raw)
To: Xuebing Wang; +Cc: alsa-devel, niranjan Patil, markus.lindroth, richard Jiang
On Mon, Mar 09, 2015 at 05:09:34PM +0800, Xuebing Wang wrote:
> After I receive data (in the format of S16_LE) from SSI/I2S, I got data like
> 0x7FFF or 0x77d2. Are they supposed to be 0xFFFF or 0xF7d2?
>
> After setting bit 10 (RXEXT) of SSIx_SRCR, I still get 0x7FFF or 0x77d2.
I don't have much detail information on it. But what I see a sign
extension should only happen during some procedures like converting
a 16-bit signed number to a 32-bit signed number. For example, the
original number is 0x8000 (16-bit), then the result should be a 32-
bit 0xFFFF8000.
However, you are still using 16-bit format and the sample data you
provided looks like positive numbers.
You might need to read a 32-bit result from the Receive FIFO so as
to get a 32-bit sign extended data.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-10 2:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-09 9:09 About iMX6SL sign extension of SSI Receive Configuration Register (SSIx_SRCR) Xuebing Wang
2015-03-10 2:33 ` Nicolin Chen
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.