Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Xuebing Wang <xbing6@gmail.com>
Cc: alsa-devel@alsa-project.org,
	niranjan Patil <Niranjan.Patil@infocus.com>,
	markus.lindroth@limesaudio.com,
	richard Jiang <Richard.Jiang@infocus.com>
Subject: Re: About iMX6SL sign extension of SSI Receive Configuration Register (SSIx_SRCR)
Date: Mon, 9 Mar 2015 19:33:03 -0700	[thread overview]
Message-ID: <20150310023302.GA1384@Asurada-GSX> (raw)
In-Reply-To: <54FD634E.8040007@gmail.com>

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.

      reply	other threads:[~2015-03-10  2:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20150310023302.GA1384@Asurada-GSX \
    --to=nicoleotsuka@gmail.com \
    --cc=Niranjan.Patil@infocus.com \
    --cc=Richard.Jiang@infocus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=markus.lindroth@limesaudio.com \
    --cc=xbing6@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