Deleted Added
sdiff udiff text old ( 164614 ) new ( 167256 )
full compact
1/*-
2 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

27#include <dev/sound/pcm/sound.h>
28#include <dev/sound/pcm/ac97.h>
29#include <dev/sound/pcm/ac97_patch.h>
30
31#include <dev/pci/pcivar.h>
32
33#include "mixer_if.h"
34
35SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/ac97.c 164614 2006-11-26 12:24:06Z ariff $");
36
37MALLOC_DEFINE(M_AC97, "ac97", "ac97 codec");
38
39struct ac97mixtable_entry {
40 int reg:8; /* register index */
41 /* reg < 0 if inverted polarity */
42 unsigned bits:4; /* width of control field */
43 unsigned ofs:4; /* offset (only if stereo=0) */

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

533 bzero(&codec->mix[SOUND_MIXER_OGAIN],
534 sizeof(codec->mix[SOUND_MIXER_OGAIN]));
535 }
536}
537
538static void
539ac97_fix_tone(struct ac97_info *codec)
540{
541 /* Hide treble and bass if they don't exist */
542 if ((codec->caps & AC97_CAP_TONE) == 0) {
543 bzero(&codec->mix[SOUND_MIXER_BASS],
544 sizeof(codec->mix[SOUND_MIXER_BASS]));
545 bzero(&codec->mix[SOUND_MIXER_TREBLE],
546 sizeof(codec->mix[SOUND_MIXER_TREBLE]));
547 }
548}

--- 499 unchanged lines hidden ---