Re: [PATCH 3/4] ASOC: WM8731 codec: add SPI support as well as I2C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 01 September 2008 15:02, you wrote:
> On Mon, Sep 01, 2008 at 02:52:08PM +0100, Alan Horstmann wrote:
> > in order to force use of SPI when (CONFIG_SND_SOC_WM8731_SPI) and
> > (CONFIG_I2C) are both defined.  Or have we misunderstood the intention? 
> > This is in 2 other places also in the patch.
>
> 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.
>
> Liam

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 
bus.  Does the codec ONLY work in spi master?

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.

Alan

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux