maestro3.c (168847) | maestro3.c (170521) |
---|---|
1/*- 2 * Copyright (c) 2001 Scott Long <scottl@freebsd.org> 3 * Copyright (c) 2001 Darrell Anderson <anderson@cs.duke.edu> 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: --- 47 unchanged lines hidden (view full) --- 56#include <dev/sound/pcm/ac97.h> 57 58#include <dev/pci/pcireg.h> 59#include <dev/pci/pcivar.h> 60 61#include <gnu/dev/sound/pci/maestro3_reg.h> 62#include <gnu/dev/sound/pci/maestro3_dsp.h> 63 | 1/*- 2 * Copyright (c) 2001 Scott Long <scottl@freebsd.org> 3 * Copyright (c) 2001 Darrell Anderson <anderson@cs.duke.edu> 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: --- 47 unchanged lines hidden (view full) --- 56#include <dev/sound/pcm/ac97.h> 57 58#include <dev/pci/pcireg.h> 59#include <dev/pci/pcivar.h> 60 61#include <gnu/dev/sound/pci/maestro3_reg.h> 62#include <gnu/dev/sound/pci/maestro3_dsp.h> 63 |
64SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/maestro3.c 168847 2007-04-18 18:26:41Z ariff $"); | 64SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/maestro3.c 170521 2007-06-11 00:49:46Z ariff $"); |
65 66/* -------------------------------------------------------------------- */ 67 68enum {CHANGE=0, CALL=1, INTR=2, BORING=3, NONE=-1}; 69#ifndef M3_DEBUG_LEVEL 70#define M3_DEBUG_LEVEL NONE 71#endif 72#define M3_DEBUG(level, _msg) {if ((level) <= M3_DEBUG_LEVEL) {printf _msg;}} --- 495 unchanged lines hidden (view full) --- 568 569static int 570m3_pchan_trigger(kobj_t kobj, void *chdata, int go) 571{ 572 struct sc_pchinfo *ch = chdata; 573 struct sc_info *sc = ch->parent; 574 int ret; 575 | 65 66/* -------------------------------------------------------------------- */ 67 68enum {CHANGE=0, CALL=1, INTR=2, BORING=3, NONE=-1}; 69#ifndef M3_DEBUG_LEVEL 70#define M3_DEBUG_LEVEL NONE 71#endif 72#define M3_DEBUG(level, _msg) {if ((level) <= M3_DEBUG_LEVEL) {printf _msg;}} --- 495 unchanged lines hidden (view full) --- 568 569static int 570m3_pchan_trigger(kobj_t kobj, void *chdata, int go) 571{ 572 struct sc_pchinfo *ch = chdata; 573 struct sc_info *sc = ch->parent; 574 int ret; 575 |
576 if (!PCMTRIG_COMMON(go)) 577 return (0); 578 |
|
576 M3_LOCK(sc); 577 ret = m3_pchan_trigger_locked(kobj, chdata, go); 578 M3_UNLOCK(sc); 579 580 return (ret); 581} 582 583static int --- 327 unchanged lines hidden (view full) --- 911 912static int 913m3_rchan_trigger(kobj_t kobj, void *chdata, int go) 914{ 915 struct sc_rchinfo *ch = chdata; 916 struct sc_info *sc = ch->parent; 917 int ret; 918 | 579 M3_LOCK(sc); 580 ret = m3_pchan_trigger_locked(kobj, chdata, go); 581 M3_UNLOCK(sc); 582 583 return (ret); 584} 585 586static int --- 327 unchanged lines hidden (view full) --- 914 915static int 916m3_rchan_trigger(kobj_t kobj, void *chdata, int go) 917{ 918 struct sc_rchinfo *ch = chdata; 919 struct sc_info *sc = ch->parent; 920 int ret; 921 |
922 if (!PCMTRIG_COMMON(go)) 923 return (0); 924 |
|
919 M3_LOCK(sc); 920 ret = m3_rchan_trigger_locked(kobj, chdata, go); 921 M3_UNLOCK(sc); 922 923 return (ret); 924} 925 926static int --- 818 unchanged lines hidden --- | 925 M3_LOCK(sc); 926 ret = m3_rchan_trigger_locked(kobj, chdata, go); 927 M3_UNLOCK(sc); 928 929 return (ret); 930} 931 932static int --- 818 unchanged lines hidden --- |