All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Cc: alsa-devel@alsa-project.org, "Wang, Qi" <qi.wang@intel.com>,
	Takashi Iwai <tiwai@suse.de>,
	"Wang, Yong Y" <yong.y.wang@intel.com>,
	linux-kernel@vger.kernel.org, "Ewe,
	Kok Howg" <kok.howg.ewe@intel.com>, Liam Girdwood <lrg@ti.com>,
	"Clark, Joel" <joel.clark@intel.com>
Subject: Re: [PATCH] Add SoundCard driver for OKI SEMICONDUCTOR ML7213 IOH
Date: Tue, 8 Nov 2011 14:38:18 +0000	[thread overview]
Message-ID: <20111108143818.GA5632@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4EB8F079.9080703@dsn.lapis-semi.com>

On Tue, Nov 08, 2011 at 06:03:53PM +0900, Tomoya MORINAGA wrote:

So, I started looking at this but...

> struct snd_ml7213i2s_pcm {
> 	enum snd_soc_control_type control_type;
> 	struct snd_ml7213i2s *ml7213i2s;
> 	spinlock_t lock;
> 	unsigned int irq_pos;
> 	unsigned int buf_pos;
> 	struct snd_pcm_substream *substream;
> 	struct cbdata cbd;              /* i2s callback info */
> 	unsigned int channels;
> 	unsigned int rw;
> 	unsigned int rate;
> 	unsigned int ch;
> 	unsigned int setup_flag;
> 	unsigned int format;
> 	unsigned int bclkfs;
> 	struct mutex i2c_mutex;
> };

...this looks *really* confused, there's things in here which are a mix
of DMA controller and CODEC driver things.  The CODEC and DMA drivers
shouldn't know anything about each other, let alone be referencing the
same data structure.

> /*
>  * wm8731 register cache
>  * We can't read the WM8731 register space when we are
>  * using 2 wire for device control, so we cache them instead.
>  * There is no point in caching the reset register
>  */
> static const u16 wm8731_reg[WM8731_CACHEREGNUM] = {
> 	0x0097, 0x0097, 0x0079, 0x0079,
> 	0x000a, 0x0008, 0x009f, 0x000a,
> 	0x0000, 0x0000
> };

This is is just obviously wrong for this driver.  I stopped reading the
code at this point.

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Cc: Takashi Iwai <tiwai@suse.de>,
	perex@perex.cz, linux-kernel@vger.kernel.org, "Wang,
	Qi" <qi.wang@intel.com>, "Wang, Yong Y" <yong.y.wang@intel.com>,
	"Clark, Joel" <joel.clark@intel.com>,
	"Ewe, Kok Howg" <kok.howg.ewe@intel.com>,
	Liam Girdwood <lrg@ti.com>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH] Add SoundCard driver for OKI SEMICONDUCTOR ML7213 IOH
Date: Tue, 8 Nov 2011 14:38:18 +0000	[thread overview]
Message-ID: <20111108143818.GA5632@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4EB8F079.9080703@dsn.lapis-semi.com>

On Tue, Nov 08, 2011 at 06:03:53PM +0900, Tomoya MORINAGA wrote:

So, I started looking at this but...

> struct snd_ml7213i2s_pcm {
> 	enum snd_soc_control_type control_type;
> 	struct snd_ml7213i2s *ml7213i2s;
> 	spinlock_t lock;
> 	unsigned int irq_pos;
> 	unsigned int buf_pos;
> 	struct snd_pcm_substream *substream;
> 	struct cbdata cbd;              /* i2s callback info */
> 	unsigned int channels;
> 	unsigned int rw;
> 	unsigned int rate;
> 	unsigned int ch;
> 	unsigned int setup_flag;
> 	unsigned int format;
> 	unsigned int bclkfs;
> 	struct mutex i2c_mutex;
> };

...this looks *really* confused, there's things in here which are a mix
of DMA controller and CODEC driver things.  The CODEC and DMA drivers
shouldn't know anything about each other, let alone be referencing the
same data structure.

> /*
>  * wm8731 register cache
>  * We can't read the WM8731 register space when we are
>  * using 2 wire for device control, so we cache them instead.
>  * There is no point in caching the reset register
>  */
> static const u16 wm8731_reg[WM8731_CACHEREGNUM] = {
> 	0x0097, 0x0097, 0x0079, 0x0079,
> 	0x000a, 0x0008, 0x009f, 0x000a,
> 	0x0000, 0x0000
> };

This is is just obviously wrong for this driver.  I stopped reading the
code at this point.

  parent reply	other threads:[~2011-11-08 14:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <70D251FDDC55405882A8447CC455D56E@hacdom.okisemi.com>
     [not found] ` <8486F61FC3B94B908BFE654234DD6C97@hacdom.okisemi.com>
2011-10-17  4:28   ` [PATCH] Add SoundCard driver for OKI SEMICONDUCTOR ML7213 IOH Tomoya MORINAGA
2011-10-21 14:16     ` Takashi Iwai
2011-10-24 12:12       ` Tomoya MORINAGA
2011-10-24 12:20         ` Mark Brown
2011-10-24 12:20           ` Mark Brown
2011-11-08  9:03           ` Tomoya MORINAGA
2011-11-08 10:39             ` Mark Brown
2011-11-08 10:39               ` Mark Brown
2011-11-09  2:56               ` Tomoya MORINAGA
2011-11-08 14:38             ` Mark Brown [this message]
2011-11-08 14:38               ` Mark Brown
2011-11-10  5:00               ` Tomoya MORINAGA
2011-11-10 11:22                 ` Mark Brown
2011-11-10 11:22                   ` Mark Brown
2011-07-06 10:27 Toshiharu Okada
2011-07-06 11:06 ` Takashi Iwai
2011-07-07  7:54   ` Toshiharu Okada
2011-07-07  7:54     ` Toshiharu Okada
2011-07-07  9:00     ` Takashi Iwai
2011-07-07  9:00       ` Takashi Iwai
2011-07-07 12:35       ` Toshiharu Okada
2011-07-07 12:35         ` Toshiharu Okada
2011-07-07 16:38         ` Takashi Iwai
2011-07-07 16:38           ` Takashi Iwai
2011-07-08 10:52           ` Toshiharu Okada
2011-07-08 10:52             ` Toshiharu Okada
2011-07-09  1:34           ` Mark Brown
2011-07-09  7:40             ` Takashi Iwai

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=20111108143818.GA5632@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=joel.clark@intel.com \
    --cc=kok.howg.ewe@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=qi.wang@intel.com \
    --cc=tiwai@suse.de \
    --cc=tomoya-linux@dsn.lapis-semi.com \
    --cc=yong.y.wang@intel.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 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.