channel.c (84793af6a9adb83c0c7425a7954fa3e3d492ec61) channel.c (eabe30fc9c3f2d6a3bc2fdcce18a0b9543b6c96e)
1/*-
2 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
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:

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

565 }
566
567 return (ret);
568}
569
570void
571chn_intr(struct pcm_channel *c)
572{
1/*-
2 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
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:

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

565 }
566
567 return (ret);
568}
569
570void
571chn_intr(struct pcm_channel *c)
572{
573 CHN_LOCK(c);
573 uint8_t do_unlock;
574 if (CHN_LOCK_OWNED(c)) {
575 /*
576 * Allow sound drivers to call this function with
577 * "CHN_LOCK()" locked:
578 */
579 do_unlock = 0;
580 } else {
581 do_unlock = 1;
582 CHN_LOCK(c);
583 }
574 c->interrupts++;
575 if (c->direction == PCMDIR_PLAY)
576 chn_wrintr(c);
577 else
578 chn_rdintr(c);
584 c->interrupts++;
585 if (c->direction == PCMDIR_PLAY)
586 chn_wrintr(c);
587 else
588 chn_rdintr(c);
579 CHN_UNLOCK(c);
589 if (do_unlock) {
590 CHN_UNLOCK(c);
591 }
592 return;
580}
581
582u_int32_t
583chn_start(struct pcm_channel *c, int force)
584{
585 u_int32_t i, j;
586 struct snd_dbuf *b = c->bufhard;
587 struct snd_dbuf *bs = c->bufsoft;

--- 1608 unchanged lines hidden ---
593}
594
595u_int32_t
596chn_start(struct pcm_channel *c, int force)
597{
598 u_int32_t i, j;
599 struct snd_dbuf *b = c->bufhard;
600 struct snd_dbuf *bs = c->bufsoft;

--- 1608 unchanged lines hidden ---