csapcm.c (d95502a8381196524939cc458b2ab90d76ac85a4) csapcm.c (733a4ea771adb552fffe9b1e1d1d1ee654384dcf)
1/*
2 * Copyright (c) 1999 Seigo Tanimura
3 * All rights reserved.
4 *
5 * Portions of this source are based on cwcealdr.cpp and dhwiface.cpp in
6 * cwcealdr1.zip, the sample sources by Crystal Semiconductor.
7 * Copyright (c) 1996-1998 Crystal Semiconductor Corp.
8 *

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

739{
740 struct csa_info *csa;
741 csa_res *resp;
742 int unit;
743 char status[SND_STATUSLEN];
744 struct ac97_info *codec;
745 struct sndcard_func *func;
746
1/*
2 * Copyright (c) 1999 Seigo Tanimura
3 * All rights reserved.
4 *
5 * Portions of this source are based on cwcealdr.cpp and dhwiface.cpp in
6 * cwcealdr1.zip, the sample sources by Crystal Semiconductor.
7 * Copyright (c) 1996-1998 Crystal Semiconductor Corp.
8 *

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

739{
740 struct csa_info *csa;
741 csa_res *resp;
742 int unit;
743 char status[SND_STATUSLEN];
744 struct ac97_info *codec;
745 struct sndcard_func *func;
746
747 csa = malloc(sizeof(*csa), M_DEVBUF, M_NOWAIT);
747 csa = malloc(sizeof(*csa), M_DEVBUF, M_NOWAIT | M_ZERO);
748 if (csa == NULL)
749 return (ENOMEM);
748 if (csa == NULL)
749 return (ENOMEM);
750 bzero(csa, sizeof(*csa));
751 unit = device_get_unit(dev);
752 func = device_get_ivars(dev);
753 csa->binfo = func->varinfo;
754 /*
755 * Fake the status of DMA so that the initial value of
756 * PCTL and CCTL can be stored into csa->pctl and csa->cctl,
757 * respectively.
758 */

--- 89 unchanged lines hidden ---
750 unit = device_get_unit(dev);
751 func = device_get_ivars(dev);
752 csa->binfo = func->varinfo;
753 /*
754 * Fake the status of DMA so that the initial value of
755 * PCTL and CCTL can be stored into csa->pctl and csa->cctl,
756 * respectively.
757 */

--- 89 unchanged lines hidden ---