From: Liam Girdwood <Liam.Girdwood@wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [RFC] New method for adding AC97 SNDRV_CTL_ELEM_TYPE_ENUMERATED controls
Date: Thu, 10 Feb 2005 17:22:14 +0000 [thread overview]
Message-ID: <1108056133.4533.161.camel@cearnarfon> (raw)
In-Reply-To: <s5hbras1guc.wl@alsa2.suse.de>
On Thu, 2005-02-10 at 17:10, Takashi Iwai wrote:
> Instead, we can pass the pointer of the enum record (cast to unsigned
> long) in private_value field, so that the enum texts can be given
> separately. For example,
>
> struct ac97_enum {
> unsigned char reg;
> unsigned char shift_l;
> unsigned char shift_r;
> unsigned short mask;
> const char **texts;
> };
>
> static int snd_ac97_info_enum(snd_kcontrol_t *kcontrol,
> snd_ctl_elem_info_t *info)
> {
> struct ac97_enum *rec = (struct ac97_enum *)kcontrol->priavate_value;
> ...
> strcpy(uinfo->value.enumerated.name, rec->texts[uinfo->value.enumerated.item]);
> ...
> }
That's fine with me and cleaner.
I'll submit a patch.
Liam
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
prev parent reply other threads:[~2005-02-10 17:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-10 16:33 [RFC] New method for adding AC97 SNDRV_CTL_ELEM_TYPE_ENUMERATED controls Liam Girdwood
2005-02-10 17:10 ` Takashi Iwai
2005-02-10 17:22 ` Liam Girdwood [this message]
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=1108056133.4533.161.camel@cearnarfon \
--to=liam.girdwood@wolfsonmicro.com \
--cc=alsa-devel@lists.sourceforge.net \
--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.