All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [PATCH] plugin_ops.h fixes
Date: Mon, 08 Jul 2002 12:25:05 +0200	[thread overview]
Message-ID: <s5hadp2v7ni.wl@alsa2.suse.de> (raw)
In-Reply-To: <3D295521.A14C950@ladisch.de>

At Mon, 08 Jul 2002 11:02:25 +0200,
Clemens Ladisch wrote:
> 
> This macro in plugin_ops.h
> 	#ifdef __i386__
> 	#define _get_triple_le(ptr) (*(u_int32_t*)(ptr) & 0xffffff)
> tries to access four bytes through the pointer. If the three bytes of
> valid data are at the end of a page and the next page isn't mapped,
> this results in an exception.

right...

> The companion macro
> 	#define _get_triple_be(ptr) (bswap_32(*(u_int32_t*)(ptr)) & 0xffffff)
> suffers from the same problem, and, additionally, is wrong (it lacks
> ">> 8" after the bswap).
> I fixed both macros by removing them. :-)
 
yes, thanks.


> There is a typo in get16_1230_B2.
> 
> The put16_labels array is declared as having 128 elements instead
> of 16.
> 
> The gets_* code doesn't correctly extend the sign of the value in every
> case.
> 
> put_12_A1 should have been put_12_29, and the codes for put_0123_* use
> the nonexistent macros as_s24/as_u24. (This doesn't really matter as
> put_* isn't used anyway.)
> 
> The _norms function appears to be badly broken (_min and _max
> interchanged, using 32/64 bits for 24/32 bit values). I didn't attempt
> to fix it as it isn't used, either.
 
yes.  we can remove this stuff.
Jaroslav, any plan to use still this one?

> And the summing/normalization code in pcm_route.c treats the sample as
> if it were unsigned.

nice spot.

patches are applied to cvs.


thanks,

Takashi


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Oh, it's good to be a geek.
http://thinkgeek.com/sf

  reply	other threads:[~2002-07-08 10:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-08  9:02 [PATCH] plugin_ops.h fixes Clemens Ladisch
2002-07-08 10:25 ` Takashi Iwai [this message]
2002-07-08 17:07   ` Abramo Bagnara
2002-07-09  8:36     ` Clemens Ladisch
2002-07-09  9:23       ` Abramo Bagnara
2002-07-09 11:23         ` Clemens Ladisch
2002-07-09 12:12           ` Takashi Iwai
2002-07-09 12:21             ` Clemens Ladisch
2002-07-09 12:45               ` Takashi Iwai
2002-07-09 20:20           ` Abramo Bagnara
2002-07-10 12:21         ` Jaroslav Kysela
2002-07-10 13:21           ` another problems with signed arithmetic snd_pcm_mmap_playback_avail tomasz motylewski
2002-07-10 16:32             ` tomasz motylewski
2002-07-10 22:20           ` [PATCH] plugin_ops.h fixes Abramo Bagnara
2002-07-11  8:00             ` Jaroslav Kysela
2002-07-11  8:37           ` Clemens Ladisch

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=s5hadp2v7ni.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=clemens@ladisch.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.