All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rene Herman <rene.herman@keyaccess.nl>
To: Takashi Iwai <tiwai@suse.de>
Cc: Alsa-devel <alsa-devel@alsa-project.org>,
	Krzysztof Helt <krzysztof.h1@poczta.fm>
Subject: Re: [PATCH] wss_lib: snd_wss_calibrate_mute improvement
Date: Mon, 18 Aug 2008 13:04:16 +0200	[thread overview]
Message-ID: <48A95730.20505@keyaccess.nl> (raw)
In-Reply-To: <s5h1w0m7hnh.wl%tiwai@suse.de>

On 18-08-08 12:16, Takashi Iwai wrote:

> At Mon, 18 Aug 2008 10:50:15 +0200,
> Rene Herman wrote:
>> On 17-08-08 22:38, Krzysztof Helt wrote:
>>
>>> From: Krzysztof Helt <krzysztof.h1@wp.pl>
>>>
>>> Mute sound by setting mute bit without
>>> setting volume to 0. It makes both source code
>>> and binary shorter.
>>>
>>> Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
>> Grmmbbled-over-by: Rene Herman <rene.herman@gmail.com>
>>
>> This should be safe and the current function indeed generates crap code 
>> but in the sense of always expecting the worst broken hardware variants 
>> to be out there I must say I'd rather have seen that GCC were beter. But 
>> yes, sure.
> 
> Yeah, the slightest concern is the intention of using 0x80 there.

Yes, shared that same concern but it's very likely not significant. The 
original thought may just have been that you have to write _something_ 
so you might as well simply write 0x80 instead or or-ing in a bit and 
with volume at 0, your're even "doubly safe"...

> If this patch was already tested on some real hardwares (and I guess
> it should work), I'm willing to apply it.  Krzystof, was this tested
> on your machines?

Not (yet) on any of mine at least but actually having something where it 
does not work would be surprising. I could sort of imagine something 
being out there that ignores the mute bit but I doubt that either of us 
is actually going to have it even if it is.

Avoiding cargo-cult programming isn't unimportant so let's not be _too_ 
cautious I guess. It does currently make for crap code (GCC could be 
using cmov here it seems but it doesn't) which is an excuse...

Rene.

  reply	other threads:[~2008-08-18 11:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-17 20:38 [PATCH] wss_lib: snd_wss_calibrate_mute improvement Krzysztof Helt
2008-08-18  8:50 ` Rene Herman
2008-08-18 10:16   ` Takashi Iwai
2008-08-18 11:04     ` Rene Herman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-08-18 11:16 krzysztof.h1
2008-08-18 12:00 ` 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=48A95730.20505@keyaccess.nl \
    --to=rene.herman@keyaccess.nl \
    --cc=alsa-devel@alsa-project.org \
    --cc=krzysztof.h1@poczta.fm \
    --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.