# HG changeset patch # User fl147353 # Date 1141629256 28800 # Node ID 9acf97172dc11cc8991afadc8d6136f578ca7101 # Parent f5237ec2d4c2d08d9a137d6bde9cd49e46d381aa 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 diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/pkgdefs/Makefile --- 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 \ diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/pkgdefs/SUNWadixp/Makefile --- /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 diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/pkgdefs/SUNWadixp/depend --- /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 +# see pkginfo(4), PKG parameter +# see pkginfo(4), NAME parameter +# see pkginfo(4), VERSION parameter +# see pkginfo(4), ARCH parameter +# +# () +# () +# ... +# +# ... +# + +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 diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/pkgdefs/SUNWadixp/pkginfo.tmpl --- /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="" +#ISTATES="" +#RSTATES='' +#ULIMIT="" +#ORDER="" +#PSTAMP="" +#INTONLY="" diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/pkgdefs/SUNWadixp/postinstall --- /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} diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/pkgdefs/SUNWadixp/preremove --- /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} diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/pkgdefs/SUNWadixp/prototype_com --- /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 # where to find pkg objects +#!include # include another 'prototype' file +#!default # default used if not specified on entry +#!= # 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 +# diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/pkgdefs/SUNWadixp/prototype_i386 --- /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 # where to find pkg objects +#!include # include another 'prototype' file +#!default # default used if not specified on entry +#!= # 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 diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/pkgdefs/SUNWaudh/prototype_i386 --- 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 diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/pkgdefs/etc/exception_list_sparc --- 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 diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/uts/common/io/audio/sada/mixer/am_ad.c --- 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); } diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/uts/common/sys/audio/ac97.h --- 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 diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/uts/i86pc/Makefile.i86pc.shared --- 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 diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/uts/sparc/Makefile.sparc.shared --- 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 diff -r f5237ec2d4c2 -r 9acf97172dc1 usr/src/uts/sparc/warlock/Makefile --- 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