auaudio.c revision 1.6
11.6Slukem/* $NetBSD: auaudio.c,v 1.6 2003/07/15 02:43:35 lukem Exp $ */
21.1Ssimonb
31.1Ssimonb/*
41.1Ssimonb * Copyright 2002 Wasabi Systems, Inc.
51.1Ssimonb * All rights reserved.
61.1Ssimonb *
71.1Ssimonb * Written by Simon Burge for Wasabi Systems, Inc.
81.1Ssimonb *
91.1Ssimonb * Redistribution and use in source and binary forms, with or without
101.1Ssimonb * modification, are permitted provided that the following conditions
111.1Ssimonb * are met:
121.1Ssimonb * 1. Redistributions of source code must retain the above copyright
131.1Ssimonb *    notice, this list of conditions and the following disclaimer.
141.1Ssimonb * 2. Redistributions in binary form must reproduce the above copyright
151.1Ssimonb *    notice, this list of conditions and the following disclaimer in the
161.1Ssimonb *    documentation and/or other materials provided with the distribution.
171.1Ssimonb * 3. All advertising materials mentioning features or use of this software
181.1Ssimonb *    must display the following acknowledgement:
191.1Ssimonb *      This product includes software developed for the NetBSD Project by
201.1Ssimonb *      Wasabi Systems, Inc.
211.1Ssimonb * 4. The name of Wasabi Systems, Inc. may not be used to endorse
221.1Ssimonb *    or promote products derived from this software without specific prior
231.1Ssimonb *    written permission.
241.1Ssimonb *
251.1Ssimonb * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
261.1Ssimonb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
271.1Ssimonb * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
281.1Ssimonb * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
291.1Ssimonb * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
301.1Ssimonb * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
311.1Ssimonb * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
321.1Ssimonb * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
331.1Ssimonb * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
341.1Ssimonb * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
351.1Ssimonb * POSSIBILITY OF SUCH DAMAGE.
361.1Ssimonb */
371.6Slukem
381.6Slukem#include <sys/cdefs.h>
391.6Slukem__KERNEL_RCSID(0, "$NetBSD: auaudio.c,v 1.6 2003/07/15 02:43:35 lukem Exp $");
401.1Ssimonb
411.1Ssimonb#include <sys/param.h>
421.1Ssimonb#include <sys/systm.h>
431.1Ssimonb#include <sys/device.h>
441.1Ssimonb
451.1Ssimonb#include <mips/alchemy/include/aureg.h>
461.1Ssimonb#include <mips/alchemy/include/aubusvar.h>
471.1Ssimonb
481.1Ssimonbstatic int	auaudio_match(struct device *, struct cfdata *, void *);
491.1Ssimonbstatic void	auaudio_attach(struct device *, struct device *, void *);
501.1Ssimonb
511.4SthorpejCFATTACH_DECL(auaudio, sizeof (struct device),
521.5Sthorpej    auaudio_match, auaudio_attach, NULL, NULL);
531.1Ssimonb
541.1Ssimonbint
551.1Ssimonbauaudio_match(struct device *parent, struct cfdata *match, void *aux)
561.1Ssimonb{
571.1Ssimonb	struct aubus_attach_args *aa = aux;
581.1Ssimonb
591.1Ssimonb	return (0);	/* XXX unimplemented! */
601.2Sthorpej	if (strcmp(aa->aa_name, match->cf_name) == 0)
611.1Ssimonb		return (1);
621.1Ssimonb
631.1Ssimonb	return (0);
641.1Ssimonb}
651.1Ssimonb
661.1Ssimonbvoid
671.1Ssimonbauaudio_attach(struct device *parent, struct device *self, void *aux)
681.1Ssimonb{
691.1Ssimonb
701.1Ssimonb	printf(": Au1X00 audio\n");	/* \n in clockattach */
711.1Ssimonb}
72