Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Aug 2002 11:10:36 GMT
From:      Max Yuzhakov <gmt@sdf-eu.org>
To:        freebsd-hackers@freebsd.org
Subject:   dsp ioctl strange code
Message-ID:  <200208061110.g76BAaZ10388@sdf-eu.org>

next in thread | raw e-mail | index | archive | help

    Hi!

    Why in dsp ioctl code in /sys/dev/sound/pcm/dsp.c (dsp_ioctl function)
on case AIOSSIZE switch statement (ioctl AIOSSIZE intended for set some
size of internal driver structure) input data is zeroed on first step of
case statement. Why i can't realy set this size?

        case AIOSSIZE:     /* set the current blocksize */
                {
                        struct snd_size *p = (struct snd_size *)arg;

                        p->play_size = 0;
                        p->rec_size = 0;
                        if (wrch) {
                                CHN_LOCK(wrch);
                                chn_setblocksize(wrch, 2, p->play_size);
                                p->play_size = sndbuf_getblksz(wrch->bufsoft);
                                CHN_UNLOCK(wrch);
                        }
                        if (rdch) {
                                CHN_LOCK(rdch);
                                chn_setblocksize(rdch, 2, p->rec_size);
                                p->rec_size = sndbuf_getblksz(rdch->bufsoft);
                                CHN_UNLOCK(rdch);
                        }
                }
                break;

This is code fragment for RELENG_4_6


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208061110.g76BAaZ10388>