All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Alan Horstmann <gineera@aspect135.co.uk>
Cc: Takashi Iwai <tiwai@suse.de>,
	ALSA devel <alsa-devel@alsa-project.org>,
	Liam Girdwood <lg@opensource.wolfsonmicro.com>,
	Bryan Wu <cooloney@kernel.org>, Cliff Cai <cliff.cai@analog.com>
Subject: Re: [PATCH 3/4] ASOC: WM8731 codec: add SPI support	as well as I2C
Date: Tue, 2 Sep 2008 13:27:01 +0100	[thread overview]
Message-ID: <20080902122700.GA32100@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <200809021122.23012.gineera@aspect135.co.uk>

On Tue, Sep 02, 2008 at 11:22:23AM +0100, Alan Horstmann wrote:
> On Monday 01 September 2008 15:02, you wrote:

> > I've reworked the patch to allow a single kernel image to support both
> > I2C and SPI which sidesteps this problem.  I'll post this later today.

> I am aware am new to the asoc stuff, and hesitate to comment, but it would 
> seem to me that Liams suggestion:

> > It may be simpler to only have CONFIG_SND_SOC_WM8731_SPI and
> > CONFIG_SND_SOC_WM8731_I2C definitions for all the codec drivers. These
> > would be set by machine Kconfig.

> is better, since it means one or the other, or both sets of code can be built.  
> Since in most applications the hardware is always wired up on a known bus, it 
> avoids unused code built in.  Otherwise we would have to hand edit out 
> sections of code.  (CONFIG_I2C) may be set because of other devices on that 

Given the very small amount of code involved in attaching the codec to
SPI or I2C I wasn't too worried about the additional cost in the driver
itself if the kernel already contains all the bus code.  That said, I do
agree that it could be useful to have ths level of control and I'd
certainly ack a patch which added it.

Note that the drivers will still need to support both simultaneously in
order to allow support for multiple boards in a single kernel image
(which was the main problem with the original patch).  There's quite a
push to reduce the number of builds required to get coverage on ARM at
the minute partly since it is useful for distributions and partly
because it facilitates architecture wide development.

> bus.  Does the codec ONLY work in spi master?

The SPI_MASTER config option refers to the controller rather than the
target - if there is nothing able to act as a SPI master then nothing
will be able to control the codec.

> Then (CONFIG_SND_SOC_WM8731) is not really needed since it is

> CONFIG_SND_SOC_WM8731_I2C || CONFIG_SND_SOC_WM8731_SPI

> Essentially, where a hardware device can be connected in different ways 
> needing different code, a config option for each way is needed, rather than 
> being guessed from bus config options.

I'm not sure I'd go so far as *needed* - it's useful for modular kernels
where both I2C and SPI are availaible but one or the other is not loaded
in some configurations so you end up pulling the bus core in.

  reply	other threads:[~2008-09-02 12:27 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27  9:39 [PATCH 0/4] Blackfin supports for ALSA/ASOC Bryan Wu
2008-08-27  9:39 ` [PATCH 1/4] ASOC: Blackfin driver for ALSA SoC framework Bryan Wu
2008-08-27 13:48   ` Mark Brown
2008-08-27 13:48     ` Mark Brown
2008-09-03  4:09     ` Cai, Cliff
2008-09-03  4:09       ` Cai, Cliff
2008-09-03 10:38       ` Mark Brown
2008-09-03 10:38         ` Mark Brown
2008-09-04  3:54         ` [alsa-devel] " Cliff Cai
2008-09-04  3:54           ` Cliff Cai
2008-08-27  9:39 ` [PATCH 2/4] ASOC codec: add support for SSM2602 audio codec in " Bryan Wu
2008-08-27  9:39   ` Bryan Wu
2008-08-27 10:54   ` Mark Brown
2008-08-27 10:54     ` [alsa-devel] " Mark Brown
2008-08-28  5:55     ` Bryan Wu
2008-08-28  5:55       ` [alsa-devel] " Bryan Wu
2008-08-28 10:06       ` Mark Brown
2008-08-28 11:44         ` Jean Delvare
2008-08-28 11:44           ` [alsa-devel] " Jean Delvare
2008-08-27  9:39 ` [PATCH 3/4] ASOC: WM8731 codec: add SPI support as well as I2C Bryan Wu
2008-08-27  9:39   ` Bryan Wu
2008-08-27 11:01   ` Mark Brown
2008-08-27 11:01     ` [alsa-devel] " Mark Brown
2008-08-28  3:46     ` Bryan Wu
2008-08-28  3:46       ` [alsa-devel] " Bryan Wu
2008-08-28 10:14       ` Mark Brown
2008-08-28 10:14         ` [alsa-devel] " Mark Brown
2008-08-28 12:47         ` Takashi Iwai
2008-08-28 12:47           ` [alsa-devel] " Takashi Iwai
2008-08-28 13:01           ` Mark Brown
2008-08-28 13:01             ` [alsa-devel] " Mark Brown
2008-09-01 13:52   ` Alan Horstmann
2008-09-01 13:52     ` [alsa-devel] " Alan Horstmann
2008-09-01 14:00     ` Liam Girdwood
2008-09-01 14:02     ` Mark Brown
2008-09-01 14:02       ` [alsa-devel] " Mark Brown
2008-09-02 10:22       ` Alan Horstmann
2008-09-02 12:27         ` Mark Brown [this message]
2008-08-27  9:39 ` [PATCH 4/4] ALSA: add dummy function to support shared mmap in nommu Blackfin arch Bryan Wu
2008-08-27  9:39   ` Bryan Wu
2008-08-28 12:44   ` Takashi Iwai
2008-08-28 12:44     ` Takashi Iwai
2008-09-02  3:16     ` Cai, Cliff
2008-09-02  3:16       ` Cai, Cliff
2008-09-02  9:41       ` Takashi Iwai
2008-09-02  9:41         ` Takashi Iwai
2008-09-02  9:59         ` Bryan Wu
2008-09-02  9:59           ` Bryan Wu

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=20080902122700.GA32100@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=cliff.cai@analog.com \
    --cc=cooloney@kernel.org \
    --cc=gineera@aspect135.co.uk \
    --cc=lg@opensource.wolfsonmicro.com \
    --cc=tiwai@suse.de \
    /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 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.