alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [ASoC]one Small Suggestion
@ 2007-06-07 12:58 Nobin Mathew
  2007-06-08  7:47 ` Nobin Mathew
  0 siblings, 1 reply; 6+ messages in thread
From: Nobin Mathew @ 2007-06-07 12:58 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel

Liam,

Thank you for your support, my work is almost complete now, driver is
working perfectly now.


I have one suggestion,

I modified the wm9713.c codec driver in probe function , so that


	if(socdev->machine->dai_link->cpu_dai->private_data)
		codec->ac97->bus->private_data =
socdev->machine->dai_link->cpu_dai->private_data;

Here i am assigning the controller private data.


so that my following ac97 read and write to access codec registers become good.

static void aaci_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
unsigned short val)
{
	struct platform_controller *controller = ac97->bus->private_data;
	struct aaci *aaci = (struct aaci *)controller->bus_controller;


static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
{
	struct platform_controller *controller = ac97->bus->private_data;
	struct aaci *aaci = (struct aaci *)controller->bus_controller;
	u32 v;


Is there a way to accomodate this in existing ASoC design?
Or a better way to do this?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ASoC]one Small Suggestion
  2007-06-07 12:58 [ASoC]one Small Suggestion Nobin Mathew
@ 2007-06-08  7:47 ` Nobin Mathew
  2007-06-08  7:56   ` Graeme Gregory
  0 siblings, 1 reply; 6+ messages in thread
From: Nobin Mathew @ 2007-06-08  7:47 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel

Adding a nice proc interface to read codec registers will be a nice
feature have, like we have in generic ac97 registers, i added that
that in wm9713.c by using ac97_proc.c

On 6/7/07, Nobin Mathew <nobin.mathew@gmail.com> wrote:
> Liam,
>
> Thank you for your support, my work is almost complete now, driver is
> working perfectly now.
>
>
> I have one suggestion,
>
> I modified the wm9713.c codec driver in probe function , so that
>
>
>         if(socdev->machine->dai_link->cpu_dai->private_data)
>                 codec->ac97->bus->private_data =
> socdev->machine->dai_link->cpu_dai->private_data;
>
> Here i am assigning the controller private data.
>
>
> so that my following ac97 read and write to access codec registers become good.
>
> static void aaci_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
> unsigned short val)
> {
>         struct platform_controller *controller = ac97->bus->private_data;
>         struct aaci *aaci = (struct aaci *)controller->bus_controller;
>
>
> static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
> {
>         struct platform_controller *controller = ac97->bus->private_data;
>         struct aaci *aaci = (struct aaci *)controller->bus_controller;
>         u32 v;
>
>
> Is there a way to accomodate this in existing ASoC design?
> Or a better way to do this?
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ASoC]one Small Suggestion
  2007-06-08  7:47 ` Nobin Mathew
@ 2007-06-08  7:56   ` Graeme Gregory
  2007-06-08  8:26     ` Nobin Mathew
  0 siblings, 1 reply; 6+ messages in thread
From: Graeme Gregory @ 2007-06-08  7:56 UTC (permalink / raw)
  To: Nobin Mathew; +Cc: alsa-devel

On Fri, 2007-06-08 at 13:17 +0530, Nobin Mathew wrote:
> Adding a nice proc interface to read codec registers will be a nice
> feature have, like we have in generic ac97 registers, i added that
> that in wm9713.c by using ac97_proc.c
> 
You mean like /sys/devices/platform/soc-audio/codec_reg :-)

Liam is working currently on the private data issue in his new edition
of ASoC coming soon.

Graeme (sitting 4 feet to left of Liam).

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ASoC]one Small Suggestion
  2007-06-08  7:56   ` Graeme Gregory
@ 2007-06-08  8:26     ` Nobin Mathew
  2007-06-08  8:47       ` Graeme Gregory
  2007-06-08  8:48       ` Takashi Iwai
  0 siblings, 2 replies; 6+ messages in thread
From: Nobin Mathew @ 2007-06-08  8:26 UTC (permalink / raw)
  To: Graeme Gregory; +Cc: alsa-devel

Like we have in /proc/asound/card0/codec97#0/ac97#0-0+regs

On 6/8/07, Graeme Gregory <gg@opensource.wolfsonmicro.com> wrote:
> On Fri, 2007-06-08 at 13:17 +0530, Nobin Mathew wrote:
> > Adding a nice proc interface to read codec registers will be a nice
> > feature have, like we have in generic ac97 registers, i added that
> > that in wm9713.c by using ac97_proc.c
> >
> You mean like /sys/devices/platform/soc-audio/codec_reg :-)
>
> Liam is working currently on the private data issue in his new edition
> of ASoC coming soon.
>
> Graeme (sitting 4 feet to left of Liam).
>
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ASoC]one Small Suggestion
  2007-06-08  8:26     ` Nobin Mathew
@ 2007-06-08  8:47       ` Graeme Gregory
  2007-06-08  8:48       ` Takashi Iwai
  1 sibling, 0 replies; 6+ messages in thread
From: Graeme Gregory @ 2007-06-08  8:47 UTC (permalink / raw)
  To: Nobin Mathew; +Cc: alsa-devel

On Fri, 2007-06-08 at 13:56 +0530, Nobin Mathew wrote:
> Like we have in /proc/asound/card0/codec97#0/ac97#0-0+regs
> 
I think you miss the point, the codec regs are already exposed
on sysfs.

When Liams new asoc is finished, this will also handle multiple
codecs being exposed.

The path I posted is from a running asoc driver.

Graeme

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ASoC]one Small Suggestion
  2007-06-08  8:26     ` Nobin Mathew
  2007-06-08  8:47       ` Graeme Gregory
@ 2007-06-08  8:48       ` Takashi Iwai
  1 sibling, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2007-06-08  8:48 UTC (permalink / raw)
  To: Nobin Mathew; +Cc: alsa-devel, Graeme Gregory

At Fri, 8 Jun 2007 13:56:14 +0530,
Nobin Mathew wrote:
> 
> Like we have in /proc/asound/card0/codec97#0/ac97#0-0+regs

sysfs is preferred nowadays :)

But, it's up to driver author which to choose.  If procfs is easier to
implement, then no problem to keep using procfs, IMO.

Possibly we can move all proc stuff to sysfs, but I didn't do that
because I see little merit by that.


Takashi

> On 6/8/07, Graeme Gregory <gg@opensource.wolfsonmicro.com> wrote:
> > On Fri, 2007-06-08 at 13:17 +0530, Nobin Mathew wrote:
> > > Adding a nice proc interface to read codec registers will be a nice
> > > feature have, like we have in generic ac97 registers, i added that
> > > that in wm9713.c by using ac97_proc.c
> > >
> > You mean like /sys/devices/platform/soc-audio/codec_reg :-)
> >
> > Liam is working currently on the private data issue in his new edition
> > of ASoC coming soon.
> >
> > Graeme (sitting 4 feet to left of Liam).
> >
> >
> >
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-06-08  8:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-07 12:58 [ASoC]one Small Suggestion Nobin Mathew
2007-06-08  7:47 ` Nobin Mathew
2007-06-08  7:56   ` Graeme Gregory
2007-06-08  8:26     ` Nobin Mathew
2007-06-08  8:47       ` Graeme Gregory
2007-06-08  8:48       ` Takashi Iwai

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).