alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: ASoC and a codec that can't be controlled
Date: Thu, 31 May 2007 13:55:27 -0500	[thread overview]
Message-ID: <465F1A1F.6070009@freescale.com> (raw)
In-Reply-To: <1180632733.29590.115.camel@a10072.wolfsonmicro.main>

Liam Girdwood wrote:

>> On big-endian platforms like mine, CS4270_FORMATS will be SNDRV_PCM_FORMAT_S24_BE and on 
>> little-endian platforms it will be SNDRV_PCM_FORMAT_S24_LE.  Assuming the I2S registers 
>> are the same endian as the platform, will this work?
>>
> 
> I think this probably depends on how your audio FIFO's align the data
> received from memory/DMA.  They should do any bit reordering based on
> the audio format, and size etc set in the control register. (Although,
> ymmv.)

Ok, I'm a little confused.  I was going to specify the SNDRV_PCM_FORMAT_S24_BE for my I2C 
device because the actual 32-bit memory-mapped registers are big-endian.  The structure 
definition even uses __be32 for each field.

My goal was to specify a single value (i.e. SNDRV_PCM_FORMAT_S24_BE) such that ALSA would 
give me a 32-bit quantity that exactly matches what my device expects.

I wish asound.h had more documentation.  I don't know what any of these macros *really* mean.

>> #define CS4270_FORMATS (SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE)
>>
>> That would tell ALSA that the CS4270 supports both formats, which isn't technically true, 
>> but it wouldn't matter because the I2S interface is what determines the actual 
>> "endianness" of the serial data.
> 
> This looks fine as a workaround atm, I'll try and have a look at this
> bug tomorrow so we don't need to do this.

Ok, I'll do this for now.



-- 
Timur Tabi
Linux Kernel Developer @ Freescale

      reply	other threads:[~2007-05-31 18:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 15:47 ASoC and a codec that can't be controlled Timur Tabi
2007-05-23 15:37 ` Liam Girdwood
2007-05-25 20:17   ` Timur Tabi
2007-05-28 12:10     ` Liam Girdwood
2007-05-29  0:18       ` Timur Tabi
2007-05-29  8:53         ` Liam Girdwood
2007-05-29 18:10           ` Timur Tabi
2007-05-30 12:28             ` Liam Girdwood
2007-05-29 18:47       ` Timur Tabi
2007-05-30 12:20         ` Liam Girdwood
2007-05-29 19:02       ` Timur Tabi
     [not found]         ` <1180529741.29590.54.camel@a10072.wolfsonmicro.main>
2007-05-30 18:10           ` Timur Tabi
2007-05-31 17:19             ` Liam Girdwood
2007-05-31 19:49               ` Timur Tabi
2007-06-01 13:36                 ` Liam Girdwood
2007-06-01 13:45                   ` Timur Tabi
2007-06-01 21:34               ` Timur Tabi
2007-05-29 23:05       ` Timur Tabi
2007-05-30 13:06         ` Liam Girdwood
2007-05-30 15:46           ` Timur Tabi
2007-05-31 17:32             ` Liam Girdwood
2007-05-31 18:55               ` Timur Tabi [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=465F1A1F.6070009@freescale.com \
    --to=timur@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lg@opensource.wolfsonmicro.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;
as well as URLs for NNTP newsgroup(s).