Deleted Added
full compact
channel.c (83081) channel.c (83089)
1/*
2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
3 * Portions Copyright by Luigi Rizzo - 1997-99
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 15 unchanged lines hidden (view full) ---

24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <dev/sound/pcm/sound.h>
29
30#include "feeder_if.h"
31
1/*
2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
3 * Portions Copyright by Luigi Rizzo - 1997-99
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 15 unchanged lines hidden (view full) ---

24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <dev/sound/pcm/sound.h>
29
30#include "feeder_if.h"
31
32SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/channel.c 83081 2001-09-05 14:49:44Z cg $");
32SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/channel.c 83089 2001-09-05 16:28:41Z cg $");
33
34#define MIN_CHUNK_SIZE 256 /* for uiomove etc. */
35#define DMA_ALIGN_THRESHOLD 4
36#define DMA_ALIGN_MASK (~(DMA_ALIGN_THRESHOLD - 1))
37
38#define MIN(x, y) (((x) < (y))? (x) : (y))
39#define CANCHANGE(c) (!(c->flags & CHN_F_TRIGGERED))
40

--- 233 unchanged lines hidden (view full) ---

274 if (ret == 0 && !(c->flags & CHN_F_TRIGGERED))
275 chn_start(c, 0);
276 }
277 }
278 /* printf("ret: %d left: %d\n", ret, buf->uio_resid); */
279
280 if (count <= 0) {
281 c->flags |= CHN_F_DEAD;
33
34#define MIN_CHUNK_SIZE 256 /* for uiomove etc. */
35#define DMA_ALIGN_THRESHOLD 4
36#define DMA_ALIGN_MASK (~(DMA_ALIGN_THRESHOLD - 1))
37
38#define MIN(x, y) (((x) < (y))? (x) : (y))
39#define CANCHANGE(c) (!(c->flags & CHN_F_TRIGGERED))
40

--- 233 unchanged lines hidden (view full) ---

274 if (ret == 0 && !(c->flags & CHN_F_TRIGGERED))
275 chn_start(c, 0);
276 }
277 }
278 /* printf("ret: %d left: %d\n", ret, buf->uio_resid); */
279
280 if (count <= 0) {
281 c->flags |= CHN_F_DEAD;
282 printf("play interrupt timeout, channel dead\n", c->name);
282 printf("%s: play interrupt timeout, channel dead\n", c->name);
283 }
284
285 return ret;
286}
287
288static int
289chn_rddump(struct pcm_channel *c, unsigned int cnt)
290{

--- 106 unchanged lines hidden (view full) ---

397 ret = 0;
398 }
399 }
400 }
401 }
402
403 if (count <= 0) {
404 c->flags |= CHN_F_DEAD;
283 }
284
285 return ret;
286}
287
288static int
289chn_rddump(struct pcm_channel *c, unsigned int cnt)
290{

--- 106 unchanged lines hidden (view full) ---

397 ret = 0;
398 }
399 }
400 }
401 }
402
403 if (count <= 0) {
404 c->flags |= CHN_F_DEAD;
405 printf("%s record interrupt timeout, channel dead\n", c->name);
405 printf("%s: record interrupt timeout, channel dead\n", c->name);
406 }
407
408 return ret;
409}
410
411void
412chn_intr(struct pcm_channel *c)
413{

--- 717 unchanged lines hidden ---
406 }
407
408 return ret;
409}
410
411void
412chn_intr(struct pcm_channel *c)
413{

--- 717 unchanged lines hidden ---