ac97.c (109183) | ac97.c (109623) |
---|---|
1/* 2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> 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 --- 15 unchanged lines hidden (view full) --- 24 * SUCH DAMAGE. 25 */ 26 27#include <dev/sound/pcm/sound.h> 28#include <dev/sound/pcm/ac97.h> 29 30#include "mixer_if.h" 31 | 1/* 2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> 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 --- 15 unchanged lines hidden (view full) --- 24 * SUCH DAMAGE. 25 */ 26 27#include <dev/sound/pcm/sound.h> 28#include <dev/sound/pcm/ac97.h> 29 30#include "mixer_if.h" 31 |
32SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/ac97.c 109183 2003-01-13 17:43:49Z orion $"); | 32SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/ac97.c 109623 2003-01-21 08:56:16Z alfred $"); |
33 34MALLOC_DEFINE(M_AC97, "ac97", "ac97 codec"); 35 36struct ac97mixtable_entry { 37 int reg:8; 38 unsigned bits:4; 39 unsigned ofs:4; 40 unsigned stereo:1; --- 494 unchanged lines hidden (view full) --- 535 struct ac97_info *codec; 536 537 codec = (struct ac97_info *)malloc(sizeof *codec, M_AC97, M_NOWAIT); 538 if (codec == NULL) 539 return NULL; 540 541 snprintf(codec->name, AC97_NAMELEN, "%s:ac97", device_get_nameunit(dev)); 542 codec->lock = snd_mtxcreate(codec->name, "ac97 codec"); | 33 34MALLOC_DEFINE(M_AC97, "ac97", "ac97 codec"); 35 36struct ac97mixtable_entry { 37 int reg:8; 38 unsigned bits:4; 39 unsigned ofs:4; 40 unsigned stereo:1; --- 494 unchanged lines hidden (view full) --- 535 struct ac97_info *codec; 536 537 codec = (struct ac97_info *)malloc(sizeof *codec, M_AC97, M_NOWAIT); 538 if (codec == NULL) 539 return NULL; 540 541 snprintf(codec->name, AC97_NAMELEN, "%s:ac97", device_get_nameunit(dev)); 542 codec->lock = snd_mtxcreate(codec->name, "ac97 codec"); |
543 codec->methods = kobj_create(cls, M_AC97, M_WAITOK); | 543 codec->methods = kobj_create(cls, M_AC97, 0); |
544 if (codec->methods == NULL) { 545 snd_mtxlock(codec->lock); 546 snd_mtxfree(codec->lock); 547 free(codec, M_AC97); 548 return NULL; 549 } 550 551 codec->dev = dev; --- 121 unchanged lines hidden --- | 544 if (codec->methods == NULL) { 545 snd_mtxlock(codec->lock); 546 snd_mtxfree(codec->lock); 547 free(codec, M_AC97); 548 return NULL; 549 } 550 551 codec->dev = dev; --- 121 unchanged lines hidden --- |