Deleted Added
full compact
27c27
< * $FreeBSD: head/sys/dev/sound/pcm/channel.c 74797 2001-03-25 21:43:24Z cg $
---
> * $FreeBSD: head/sys/dev/sound/pcm/channel.c 75319 2001-04-08 20:20:52Z cg $
187c187
< if (ret == 0)
---
> if (ret == 0 && sndbuf_getfree(b) < amt)
727,729c727,728
< sndbuf_setspd(b, speed);
< DEB(printf("try speed %d, ", sndbuf_getspd(b)));
< sndbuf_setspd(b, CHANNEL_SETSPEED(c->methods, c->devinfo, sndbuf_getspd(b)));
---
> DEB(printf("try speed %d, ", speed));
> sndbuf_setspd(b, CHANNEL_SETSPEED(c->methods, c->devinfo, speed));
792d790
< u_int32_t hwfmt;
798,801d795
< hwfmt = c->format;
< c->feederflags &= ~(1 << FEEDER_FMT);
< if (!fmtvalid(hwfmt, chn_getcaps(c)->fmtlist))
< c->feederflags |= 1 << FEEDER_FMT;
804,805c798
< hwfmt = c->feeder->desc->out;
< sndbuf_setfmt(b, hwfmt);
---
> sndbuf_setfmt(b, c->feeder->desc->out);
808c801
< CHANNEL_SETFORMAT(c->methods, c->devinfo, hwfmt);
---
> CHANNEL_SETFORMAT(c->methods, c->devinfo, sndbuf_getfmt(b));
961c954
< u_int32_t tmp[2], src, dst, type, flags;
---
> u_int32_t tmp[2], type, flags;
965a959
>
966a961
>
968c963,964
< if (fc == NULL)
---
> if (fc == NULL) {
> DEB(printf("can't find root feeder\n"));
970c966,968
< if (chn_addfeeder(c, fc, NULL))
---
> }
> if (chn_addfeeder(c, fc, NULL)) {
> DEB(printf("can't add root feeder\n"));
971a970
> }
975,976c974,976
< src = c->feeder->desc->out;
< if ((c->flags & CHN_F_MAPPED) && (flags != 0))
---
>
> if ((c->flags & CHN_F_MAPPED) && (flags != 0)) {
> DEB(printf("can't build feeder chain on mapped channel\n"));
978c978,980
< DEB(printf("not mapped, flags %x, ", flags));
---
> }
> DEB(printf("not mapped, flags %x\n", flags));
>
988c990,991
< if (fc == NULL)
---
> if (fc == NULL) {
> DEB(printf("can't find required feeder type %d\n", type));
990,993c993,997
< dst = fc->desc->in;
< if (src != dst) {
< DEB(printf("build fmtchain from %x to %x: ", src, dst));
< tmp[0] = dst;
---
> }
>
> if (c->feeder->desc->out != fc->desc->in) {
> DEB(printf("build fmtchain from %x to %x: ", c->feeder->desc->out, fc->desc->in));
> tmp[0] = fc->desc->in;
995c999,1000
< if (chn_fmtchain(c, tmp) == 0)
---
> if (chn_fmtchain(c, tmp) == 0) {
> DEB(printf("failed\n"));
996a1002
> }
999c1005,1007
< if (chn_addfeeder(c, fc, fc->desc))
---
>
> if (chn_addfeeder(c, fc, fc->desc)) {
> DEB(printf("can't add feeder %p, output %x\n", fc, fc->desc->out));
1001,1004c1009,1010
< src = fc->desc->out;
< DEB(printf("added feeder %p, output %x\n", fc, src));
< dst = 0;
< flags &= ~(1 << type);
---
> }
> DEB(printf("added feeder %p, output %x\n", fc, c->feeder->desc->out));
1007,1008c1013,1016
< if (!fmtvalid(src, chn_getcaps(c)->fmtlist)) {
< if (chn_fmtchain(c, chn_getcaps(c)->fmtlist) == 0)
---
>
> if (!fmtvalid(c->feeder->desc->out, chn_getcaps(c)->fmtlist)) {
> if (chn_fmtchain(c, chn_getcaps(c)->fmtlist) == 0) {
> DEB(printf("can't build fmtchain from %x\n", c->feeder->desc->out));
1010,1011c1018,1019
< DEB(printf("built fmtchain from %x to %x\n", src, c->feeder->desc->out));
< flags &= ~(1 << FEEDER_FMT);
---
> }
> DEB(printf("built fmtchain from %x\n", c->feeder->desc->out));
1012a1021
>
1016,1017d1024
<
<