Deleted Added
full compact
ad1816.c (98068) ad1816.c (107285)
1/*
2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
3 * Copyright Luigi Rizzo, 1997,1998
4 * Copyright by Hannu Savolainen 1994, 1995
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

26 * SUCH DAMAGE.
27 */
28
29#include <dev/sound/pcm/sound.h>
30#include <dev/sound/isa/ad1816.h>
31
32#include "mixer_if.h"
33
1/*
2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
3 * Copyright Luigi Rizzo, 1997,1998
4 * Copyright by Hannu Savolainen 1994, 1995
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

26 * SUCH DAMAGE.
27 */
28
29#include <dev/sound/pcm/sound.h>
30#include <dev/sound/isa/ad1816.h>
31
32#include "mixer_if.h"
33
34SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/isa/ad1816.c 98068 2002-06-09 14:20:17Z hm $");
34SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/isa/ad1816.c 107285 2002-11-26 18:16:27Z cg $");
35
36struct ad1816_info;
37
38struct ad1816_chinfo {
39 struct ad1816_info *parent;
40 struct pcm_channel *channel;
41 struct snd_dbuf *buffer;
42 int dir, blksz;

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

48 struct resource *irq;
49 int irq_rid;
50 struct resource *drq1; /* play */
51 int drq1_rid;
52 struct resource *drq2; /* rec */
53 int drq2_rid;
54 void *ih;
55 bus_dma_tag_t parent_dmat;
35
36struct ad1816_info;
37
38struct ad1816_chinfo {
39 struct ad1816_info *parent;
40 struct pcm_channel *channel;
41 struct snd_dbuf *buffer;
42 int dir, blksz;

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

48 struct resource *irq;
49 int irq_rid;
50 struct resource *drq1; /* play */
51 int drq1_rid;
52 struct resource *drq2; /* rec */
53 int drq2_rid;
54 void *ih;
55 bus_dma_tag_t parent_dmat;
56 void *lock;
56 struct mtx *lock;
57
58 unsigned int bufsize;
59 struct ad1816_chinfo pch, rch;
60};
61
62static u_int32_t ad1816_fmt[] = {
63 AFMT_U8,
64 AFMT_STEREO | AFMT_U8,

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

367 }
368 if (format & AFMT_STEREO) fmt |= AD1816_STEREO;
369 io_wr(ad1816, reg, fmt);
370 ad1816_unlock(ad1816);
371#if 0
372 return format;
373#else
374 return 0;
57
58 unsigned int bufsize;
59 struct ad1816_chinfo pch, rch;
60};
61
62static u_int32_t ad1816_fmt[] = {
63 AFMT_U8,
64 AFMT_STEREO | AFMT_U8,

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

367 }
368 if (format & AFMT_STEREO) fmt |= AD1816_STEREO;
369 io_wr(ad1816, reg, fmt);
370 ad1816_unlock(ad1816);
371#if 0
372 return format;
373#else
374 return 0;
375#endif
375#endif
376}
377
378static int
379ad1816chan_setspeed(kobj_t obj, void *data, u_int32_t speed)
380{
381 struct ad1816_chinfo *ch = data;
382 struct ad1816_info *ad1816 = ch->parent;
383

--- 292 unchanged lines hidden ---
376}
377
378static int
379ad1816chan_setspeed(kobj_t obj, void *data, u_int32_t speed)
380{
381 struct ad1816_chinfo *ch = data;
382 struct ad1816_info *ad1816 = ch->parent;
383

--- 292 unchanged lines hidden ---