[alsa-devel] [ASoC]one Small Suggestion

Nobin Mathew nobin.mathew at gmail.com
Fri Jun 8 09:47:08 CEST 2007


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 at 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?
>


More information about the Alsa-devel mailing list