mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geoffrey Wossum <geoffrey@pager.net>
To: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: kernel@avr32linux.org, linux-kernel@vger.kernel.org
Subject: Re: AT32 ASoC Driver Patches on alsa-devel
Date: Thu, 5 Jun 2008 10:00:56 -0500	[thread overview]
Message-ID: <200806051000.56969.geoffrey@pager.net> (raw)
In-Reply-To: <20080605162206.0a34a54e@hskinnemo-gx745.norway.atmel.com>

On Thursday 05 June 2008 09:22:06 am Haavard Skinnemoen wrote:
> Geoffrey Wossum <geoffrey@pager.net> wrote:
> > For anyone that's interested, there's patches to add ALSA System-on-Chip
> > sound platform drivers for the AVR32 being discussed on the alsa-devel
> > mailing list right now.
>
> Hmm. For something that depends on a metric shitload of middle layers,
> it is surprisingly large...

Partly because the code attempts to handle every contingency an application 
might throw at (different sample rates, formats, clocking options, etc.).  
Partly because it also has some concern for power management.


> I have to admit I don't understand the current sound situation at all.
> With this driver, we now have:

To paraphrase Andy Tanenbaum, the great thing about standards is there's so 
many to choose from.


>   * An OSS driver for the AP7000 Audio Bitstream DAC
OSS <shudder>


>   * A "regular" ALSA driver for the AC97C (not based on ASoC)
I don't have an AC97 CODEC.


>   * An i2s driver for the AT73C213 chip using the SSC controller and SPI
Strongly coupled to the AT73C213, not the chip I'm using, although it did 
provide a good example of working code.  This is where I figured out I needed 
to use big endian.


>   * Some sort of "AT32 PCM" layer which apparently can only be used
>     with the SSC controller
This IS sort of confusing.  It's really more of a generic SSC / PDC driver 
than a "PCM layer".  Its existence is largely an artifact of it being in the 
AT91 ASoC platform code, which I "ported" to get the AT32 platform code.  Its 
existence in the AT91 platform driver is an artifact of the AT91 driver being 
based on the PXA platform driver.  In other words, I'm not really the one to 
explain the design rationale behind it.

 
>   * The above two being essentially identical to similar drivers for
>     AT91
Yes, I didn't particularly like making the AT32 code almost exactly like the 
AT91 code, and most of the differences are due to changes in some kernel APIs 
rather than the peripherals really being different (BTW, the changes in the 
AT32 are an improvement!).  But I needed an AT32 layer quickly, and I don't 
have any AT91 hardware, so I couldn't really go mucking about in the AT91 
code since I wouldn't be able to test it.  I don't feel especially bad, 
though, since at91_mci.c and atmel-mci.c commit essentially the same sin.


> Can someone please help me out here? In particular, what is ASoC and
> why should I want to use it?

Number 1 reason (for me):  The only driver for my CODEC (WM8510) was an ASoC 
driver.  Using sound system other than ASoC would require porting / rewriting 
this driver.  Since an AT91 ASoC platform driver already existed, and would 
be virtually the same as the AT32 platform driver, this was the best choice 
for getting sound quickly.  So this essentially boils down to code reuse.  
And if we switch CODEC's for some reason, it's less work.

Another highly compelling reason: power consumption.  Only powers up parts of 
the audio pathway that are currently needed.

For more reasons:  http://alsa-project.org/main/index.php/ASoC
Legal notice: I received no compensation for this endosement :)

---
Geoffrey

  reply	other threads:[~2008-06-05 15:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200806050851.47319.geoffrey@pager.net>
2008-06-05 14:22 ` Haavard Skinnemoen
2008-06-05 15:00   ` Geoffrey Wossum [this message]
2008-06-05 16:24     ` Haavard Skinnemoen
2008-06-05 16:54       ` Takashi Iwai
2008-06-05 17:06         ` Haavard Skinnemoen
2008-06-06  6:15           ` Takashi Iwai
2008-06-05 17:10       ` Geoffrey Wossum
2008-06-06  9:29         ` Haavard Skinnemoen
2008-06-06 12:07           ` Mark Brown
2008-06-06 14:32           ` Geoffrey Wossum
2008-06-05 15:22   ` Mark Brown
2008-06-05 16:40     ` Haavard Skinnemoen
2008-06-06 11:37       ` Mark Brown

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=200806051000.56969.geoffrey@pager.net \
    --to=geoffrey@pager.net \
    --cc=haavard.skinnemoen@atmel.com \
    --cc=kernel@avr32linux.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®