vchan.c (170289) | vchan.c (170521) |
---|---|
1/*- 2 * Copyright (c) 2001 Cameron Grant <cg@FreeBSD.org> 3 * Copyright (c) 2006 Ariff Abdullah <ariff@FreeBSD.org> 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: --- 17 unchanged lines hidden (view full) --- 26 */ 27 28/* Almost entirely rewritten to add multi-format/channels mixing support. */ 29 30#include <dev/sound/pcm/sound.h> 31#include <dev/sound/pcm/vchan.h> 32#include "feeder_if.h" 33 | 1/*- 2 * Copyright (c) 2001 Cameron Grant <cg@FreeBSD.org> 3 * Copyright (c) 2006 Ariff Abdullah <ariff@FreeBSD.org> 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: --- 17 unchanged lines hidden (view full) --- 26 */ 27 28/* Almost entirely rewritten to add multi-format/channels mixing support. */ 29 30#include <dev/sound/pcm/sound.h> 31#include <dev/sound/pcm/vchan.h> 32#include "feeder_if.h" 33 |
34SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/vchan.c 170289 2007-06-04 18:25:08Z dwmalone $"); | 34SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/vchan.c 170521 2007-06-11 00:49:46Z ariff $"); |
35 36MALLOC_DEFINE(M_VCHANFEEDER, "vchanfeed", "pcm vchan feeder"); 37 38typedef uint32_t (*feed_vchan_mixer)(uint8_t *, uint8_t *, uint32_t); 39 40struct vchinfo { 41 struct pcm_channel *channel; 42 struct pcmchan_caps caps; --- 383 unchanged lines hidden (view full) --- 426 427static int 428vchan_trigger(kobj_t obj, void *data, int go) 429{ 430 struct vchinfo *ch = data; 431 struct pcm_channel *c, *p; 432 int otrigger; 433 | 35 36MALLOC_DEFINE(M_VCHANFEEDER, "vchanfeed", "pcm vchan feeder"); 37 38typedef uint32_t (*feed_vchan_mixer)(uint8_t *, uint8_t *, uint32_t); 39 40struct vchinfo { 41 struct pcm_channel *channel; 42 struct pcmchan_caps caps; --- 383 unchanged lines hidden (view full) --- 426 427static int 428vchan_trigger(kobj_t obj, void *data, int go) 429{ 430 struct vchinfo *ch = data; 431 struct pcm_channel *c, *p; 432 int otrigger; 433 |
434 if (!(go == PCMTRIG_START || go == PCMTRIG_STOP || 435 go == PCMTRIG_ABORT) || go == ch->trigger) | 434 if (!PCMTRIG_COMMON(go) || go == ch->trigger) |
436 return (0); 437 438 c = ch->channel; 439 p = c->parentchannel; 440 otrigger = ch->trigger; 441 ch->trigger = go; 442 443 CHN_UNLOCK(c); --- 583 unchanged lines hidden --- | 435 return (0); 436 437 c = ch->channel; 438 p = c->parentchannel; 439 otrigger = ch->trigger; 440 ch->trigger = go; 441 442 CHN_UNLOCK(c); --- 583 unchanged lines hidden --- |