PSARC/2005/507 Solaris audio driver for ATI IXP400
6301905 Want support for Realtek/ATI Express AC'97 codec
6367508 setting playback interrupt rate to small value for audio driver may panic system
--- a/usr/src/pkgdefs/Makefile Sun Mar 05 18:00:39 2006 -0800
+++ b/usr/src/pkgdefs/Makefile Sun Mar 05 23:14:16 2006 -0800
@@ -95,6 +95,7 @@
i386_SUBDIRS= \
SUNWaac \
SUNWad810 \
+ SUNWadixp \
SUNWagp \
SUNWagph \
SUNWamr \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/pkgdefs/SUNWadixp/Makefile Sun Mar 05 23:14:16 2006 -0800
@@ -0,0 +1,37 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.com
+
+
+.KEEP_STATE:
+
+all: $(FILES) depend postinstall preremove
+install: all pkg
+
+include ../Makefile.targ
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/pkgdefs/SUNWadixp/depend Sun Mar 05 23:14:16 2006 -0800
@@ -0,0 +1,54 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This package information file defines software dependencies associated
+# with the pkg. You can define three types of pkg dependencies with this file:
+# P indicates a prerequisite for installation
+# I indicates an incompatible package
+# R indicates a reverse dependency
+# <pkg.abbr> see pkginfo(4), PKG parameter
+# <name> see pkginfo(4), NAME parameter
+# <version> see pkginfo(4), VERSION parameter
+# <arch> see pkginfo(4), ARCH parameter
+# <type> <pkg.abbr> <name>
+# (<arch>)<version>
+# (<arch>)<version>
+# ...
+# <type> <pkg.abbr> <name>
+# ...
+#
+
+P SUNWcar Core Architecture, (Root)
+P SUNWcakr Core Solaris Kernel Architecture (Root)
+P SUNWkvm Core Architecture, (Kvm)
+P SUNWcsr Core Solaris, (Root)
+P SUNWckr Core Solaris Kernel (Root)
+P SUNWcnetr Core Solaris Network Infrastructure (Root)
+P SUNWcsu Core Solaris, (Usr)
+P SUNWcsd Core Solaris Devices
+P SUNWcsl Core Solaris Libraries
+P SUNWaudd Audio Drivers
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/pkgdefs/SUNWadixp/pkginfo.tmpl Sun Mar 05 23:14:16 2006 -0800
@@ -0,0 +1,56 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This required package information file describes characteristics of the
+# package, such as package abbreviation, full package name, package version,
+# and package architecture.
+#
+PKG="SUNWadixp"
+NAME="SUNW Audio Driver for ATI IXP"
+ARCH="ISA"
+VERSION="ONVERS,REV=0.0.0"
+CATEGORY="system"
+DESC="SunOS audio device driver for ATI IXP integrated audio hardware"
+SUNW_PRODNAME="SunOS"
+SUNW_PRODVERS="RELEASE/VERSION"
+SUNW_PKGTYPE="root"
+MAXINST="1000"
+VENDOR="Sun Microsystems, Inc."
+HOTLINE="Please contact your local service provider"
+EMAIL=""
+CLASSES="none"
+BASEDIR=/
+SUNW_PKGVERS="1.0"
+SUNW_PKG_ALLZONES="true"
+SUNW_PKG_HOLLOW="true"
+#VSTOCK="<reserved by Release Engineering for package part #>"
+#ISTATES="<developer defined>"
+#RSTATES='<developer defined>'
+#ULIMIT="<developer defined>"
+#ORDER="<developer defined>"
+#PSTAMP="<developer defined>"
+#INTONLY="<developer defined>"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/pkgdefs/SUNWadixp/postinstall Sun Mar 05 23:14:16 2006 -0800
@@ -0,0 +1,53 @@
+#! /bin/sh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# SUNWadixp postinstall script
+
+PATH=/usr/bin:/usr/sbin:${PATH}
+export PATH
+
+not_installed() {
+ driver=$1
+ grep "^${driver} " $BASEDIR/etc/name_to_major > /dev/null 2>&1
+ return $?
+}
+
+EXIT=0
+
+case "${ARCH}" in
+ i386)
+ not_installed audioixp|| \
+ add_drv -b "${BASEDIR}" \
+ -i '"pci1002,4370"' \
+ -n audioixp || \
+ EXIT=1
+
+ ;;
+esac
+
+exit ${EXIT}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/pkgdefs/SUNWadixp/preremove Sun Mar 05 23:14:16 2006 -0800
@@ -0,0 +1,52 @@
+#! /bin/sh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# SUNWadixp preremove script
+
+PATH=/usr/bin:/usr/sbin:${PATH}
+export PATH
+
+EXIT=0
+
+installed() {
+ driver=$1
+ grep "^${driver} " $BASEDIR/etc/name_to_major > /dev/null 2>&1
+ if [ "$?" -eq 0 ]; then
+ return 1
+ else
+ return 0
+ fi
+}
+
+case "${ARCH}" in
+ i386)
+ installed audioixp|| rem_drv -b ${BASEDIR} audioixp || EXIT=1
+ ;;
+esac
+
+exit ${EXIT}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/pkgdefs/SUNWadixp/prototype_com Sun Mar 05 23:14:16 2006 -0800
@@ -0,0 +1,48 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This required package information file contains a list of package contents.
+# The 'pkgmk' command uses this file to identify the contents of a package
+# and their location on the development machine when building the package.
+# Can be created via a text editor or through use of the 'pkgproto' command.
+
+#!search <pathname pathname ...> # where to find pkg objects
+#!include <filename> # include another 'prototype' file
+#!default <mode> <owner> <group> # default used if not specified on entry
+#!<param>=<value> # puts parameter in pkg environment
+
+# packaging files
+i pkginfo
+i copyright
+i depend
+i postinstall
+i preremove
+#
+# source locations relative to the prototype file
+#
+# SUNWadixp
+#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/pkgdefs/SUNWadixp/prototype_i386 Sun Mar 05 23:14:16 2006 -0800
@@ -0,0 +1,54 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This required package information file contains a list of package contents.
+# The 'pkgmk' command uses this file to identify the contents of a package
+# and their location on the development machine when building the package.
+# Can be created via a text editor or through use of the 'pkgproto' command.
+
+#!search <pathname pathname ...> # where to find pkg objects
+#!include <filename> # include another 'prototype' file
+#!default <mode> <owner> <group> # default used if not specified on entry
+#!<param>=<value> # puts parameter in pkg environment
+
+#
+# Include ISA independent files (prototype_com)
+#
+!include prototype_com
+#
+# List files which are i386 specific here
+#
+# source locations relative to the prototype file
+#
+# SUNWadixp
+#
+d none kernel 755 root sys
+d none kernel/drv 755 root sys
+f none kernel/drv/audioixp 755 root sys
+f none kernel/drv/audioixp.conf 644 root sys
+d none kernel/drv/amd64 755 root sys
+f none kernel/drv/amd64/audioixp 755 root sys
--- a/usr/src/pkgdefs/SUNWaudh/prototype_i386 Sun Mar 05 18:00:39 2006 -0800
+++ b/usr/src/pkgdefs/SUNWaudh/prototype_i386 Sun Mar 05 23:14:16 2006 -0800
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
#
# CDDL HEADER END
#
+
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -47,4 +47,5 @@
# SUNWaudh
#
f none usr/include/sys/audio/audio810.h 644 root bin
+f none usr/include/sys/audio/audioixp.h 644 root bin
f none usr/include/sys/audio/audiovia823x.h 644 root bin
--- a/usr/src/pkgdefs/etc/exception_list_sparc Sun Mar 05 18:00:39 2006 -0800
+++ b/usr/src/pkgdefs/etc/exception_list_sparc Sun Mar 05 23:14:16 2006 -0800
@@ -778,6 +778,11 @@
kernel/drv/sparcv9/audio810 sparc
kernel/drv/audio810.conf sparc
#
+# ATI IXP audio driver doesn't ship in sparc platform.
+#
+kernel/drv/sparcv9/audioixp sparc
+kernel/drv/audioixp.conf sparc
+#
# VIA VT823x audio driver doesn't ship in sparc platform.
#
kernel/drv/sparcv9/audiovia823x sparc
--- a/usr/src/uts/common/io/audio/sada/mixer/am_ad.c Sun Mar 05 18:00:39 2006 -0800
+++ b/usr/src/uts/common/io/audio/sada/mixer/am_ad.c Sun Mar 05 23:14:16 2006 -0800
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 1999-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -3461,7 +3461,11 @@
mute = info->output_muted;
if (mute) {
/* we return zeros */
- bytes_needed = samples << AM_INT32_SHIFT;
+ if (mode == AM_COMPAT_MODE)
+ bytes_needed = samples << AM_INT16_SHIFT;
+ else /* mixer mode */
+ bytes_needed = samples << AM_INT32_SHIFT;
+
ATRACE("am_get_samples() bzero", buf);
bzero(buf, bytes_needed);
}
--- a/usr/src/uts/common/sys/audio/ac97.h Sun Mar 05 18:00:39 2006 -0800
+++ b/usr/src/uts/common/sys/audio/ac97.h Sun Mar 05 23:14:16 2006 -0800
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,10 +18,13 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright (c) 2000-2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
* CAUTION: This header file has not gone through a formal review process.
* Thus its commitment level is very low and may change or be removed
* at any time.
@@ -246,6 +248,7 @@
#define PCMOVR_LEFT_0dB_GAIN 0x1000
#define PCMOVR_LEFT_MAX_ATTEN 0x1f00
#define PCMOVR_MUTE 0x8000
+#define PCMOVR_GAIN_BITS 5
/* Record Select Control Register Index 1ah */
#define AC97_RECORD_SELECT_CTRL_REGISTER 0x1a
--- a/usr/src/uts/i86pc/Makefile.i86pc.shared Sun Mar 05 18:00:39 2006 -0800
+++ b/usr/src/uts/i86pc/Makefile.i86pc.shared Sun Mar 05 23:14:16 2006 -0800
@@ -18,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# uts/i86pc/Makefile.i86pc
#
@@ -266,6 +267,7 @@
$(CLOSED_BUILD)CLOSED_DRV_KMODS += ata
$(CLOSED_BUILD)CLOSED_DRV_KMODS += audiovia823x
$(CLOSED_BUILD)CLOSED_DRV_KMODS += audioens
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += audioixp
$(CLOSED_BUILD)CLOSED_DRV_KMODS += bmc
$(CLOSED_BUILD)CLOSED_DRV_KMODS_32 += bscbus
$(CLOSED_BUILD)CLOSED_DRV_KMODS_32 += bscv
--- a/usr/src/uts/sparc/Makefile.sparc.shared Sun Mar 05 18:00:39 2006 -0800
+++ b/usr/src/uts/sparc/Makefile.sparc.shared Sun Mar 05 23:14:16 2006 -0800
@@ -267,6 +267,7 @@
DRV_KMODS += fcode
$(CLOSED_BUILD)CLOSED_DRV_KMODS += audioens
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += audioixp
$(CLOSED_BUILD)CLOSED_DRV_KMODS += audiovia823x
$(CLOSED_BUILD)CLOSED_DRV_KMODS += chxge
$(CLOSED_BUILD)CLOSED_DRV_KMODS += dad
--- a/usr/src/uts/sparc/warlock/Makefile Sun Mar 05 18:00:39 2006 -0800
+++ b/usr/src/uts/sparc/warlock/Makefile Sun Mar 05 23:14:16 2006 -0800
@@ -121,6 +121,7 @@
@cd $(CLOSED)/uts/sparc/audiovia823x; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../audiocs; rm -f *.ll *.ok; $(MAKE) warlock
@cd $(CLOSED)/uts/sparc/audioens; rm -f *.ll *.ok; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/audioixp; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../audiots; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../usb_ac; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../usb_as; rm -f *.ll *.ok; $(MAKE) warlock