All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
	Matthew Ranostay <mranostay@embeddedalley.com>
Subject: Re: [PATCH] snd-hda-intel: Jack Mode changes for Sigmatel boards
Date: Mon, 25 May 2009 18:07:29 +0000	[thread overview]
Message-ID: <4A1ADE61.2090702@gmail.com> (raw)
In-Reply-To: <s5hvdnp5wdv.wl%tiwai@suse.de>

Takashi Iwai wrote:
> Hi,
>
> sorry for the late review.  Some comments below.
>   
No worries.  I know you're busy, and I appreciate your time and help :)

>> +        i = 3;
>> +    else
>> +        i = 2;
>> +
>> +    uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
>> +    uinfo->value.enumerated.items = i;
>> +    uinfo->count = 1;
>> +    if (uinfo->value.enumerated.item >= i)
>> +        uinfo->value.enumerated.item = i-1;
>>     
>
> Didn't checkpatch.pl complain?  :)
>   
It didn't actually.  What should it have complained about, so I can fix it?
> Well, these two functions, stac92xx_vref_get() and stac92xx_get_vref()
> are too confusing.  We have to rename one of them, at least, or at best
> clean up a bit more.
I agree.  stac92xx_vref_get() and stac92xx_vref_set() are a pair, so
perhaps they should stay as they are, and stac92xx_get_vref() be renamed
to stac92xx_get_default_vref() or something?

>
> Hmm, this code flow is too complex and hackish to follow.
> There must be a better way.  For example, the complicated neted if
> checks can be put out to a function.  The compiler is clever enough to
> inline, and here is no critical code path for speed.
>
>
> Could you fix and repost please?
>
>
> thanks,
>
> Takashi
>
>   
I've added a function stac92xx_add_mic_jack_control() to take care of
the if's and add the control.  The code is much cleaner now IMO.  Is
this function name ok, and do you have any other thoughts?

I'll be posting the new patch soon so that you can actually look at that
as well.

Thanks,
Nick

  reply	other threads:[~2009-05-26  0:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-20 12:35 [PATCH] snd-hda-intel: Jack Mode changes for Sigmatel boards Nickolas Lloyd
2009-05-25 10:07 ` Takashi Iwai
2009-05-25 18:07   ` Nickolas Lloyd [this message]
2009-05-25 19:18   ` Nickolas Lloyd
2009-05-27  7:20     ` Takashi Iwai
2009-05-27 14:14       ` Nickolas Lloyd
2009-05-29  6:40         ` Takashi Iwai
2009-05-29 13:16           ` Nickolas Lloyd
2009-05-29 16:41           ` Nickolas Lloyd
2009-06-01  9:13             ` 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=4A1ADE61.2090702@gmail.com \
    --to=ultrageek.lloyd@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=mranostay@embeddedalley.com \
    --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.