Update of /cvsroot/alsa/alsa-kernel/pci/ice1712 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11892/pci/ice1712
Modified Files: Makefile ice1724.c Added Files: vt1720_mobo.c vt1720_mobo.h Log Message: - fixed the description of model module parameters for ice1712 and ice1724 drivers. - added the support of VT1720-based mobo. (still experimental and supporting AC97 only) --- NEW FILE: vt1720_mobo.c --- /* * ALSA driver for VT1720/VT1724 (Envy24PT/Envy24HT) * * Lowlevel functions for VT1720-based motherboards * * Copyright (c) 2004 Takashi Iwai <[EMAIL PROTECTED]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include <sound/driver.h> #include <asm/io.h> #include <linux/delay.h> #include <linux/interrupt.h> #include <linux/init.h> #include <linux/slab.h> #include <sound/core.h> #include "ice1712.h" #include "vt1720_mobo.h" static int __devinit k8x800_init(ice1712_t *ice) { ice->vt1720 = 1; /* VT1616 codec */ ice->num_total_dacs = 6; ice->num_total_adcs = 2; /* WM8728 codec */ /* FIXME: TODO */ return 0; } static int __devinit k8x800_add_controls(ice1712_t *ice) { /* FIXME: needs some quirks for VT1616? */ return 0; } /* EEPROM image */ static unsigned char k8x800_eeprom[] __devinitdata = { 0x01, /* SYSCONF: clock 256, 1ADC, 2DACs */ 0x02, /* ACLINK: ACLINK, packed */ 0x00, /* I2S: - */ 0x00, /* SPDIF: - */ 0xff, /* GPIO_DIR */ 0xff, /* GPIO_DIR1 */ 0x00, /* - */ 0xff, /* GPIO_MASK */ 0xff, /* GPIO_MASK1 */ 0x00, /* - */ 0x00, /* GPIO_STATE */ 0x00, /* GPIO_STATE1 */ 0x00, /* - */ }; /* entry point */ struct snd_ice1712_card_info snd_vt1720_mobo_cards[] __devinitdata = { { .subvendor = VT1720_SUBDEVICE_K8X800, .name = "Albatron K8X800 Pro II", .model = "k8x800", .chip_init = k8x800_init, .build_controls = k8x800_add_controls, .eeprom_size = sizeof(k8x800_eeprom), .eeprom_data = k8x800_eeprom, }, { .subvendor = VT1720_SUBDEVICE_ZNF3_150, .name = "Chaintech ZNF3-150", /* identical with k8x800 */ .chip_init = k8x800_init, .build_controls = k8x800_add_controls, .eeprom_size = sizeof(k8x800_eeprom), .eeprom_data = k8x800_eeprom, }, { } /* terminator */ }; --- NEW FILE: vt1720_mobo.h --- #ifndef __SOUND_VT1720_MOBO_H #define __SOUND_VT1720_MOBO_H /* * ALSA driver for VT1720/VT1724 (Envy24PT/Envy24HT) * * Lowlevel functions for VT1720-based motherboards * * Copyright (c) 2004 Takashi Iwai <[EMAIL PROTECTED]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #define VT1720_MOBO_DEVICE_DESC "{Albatron,K8X800 Pro II},"\ "{Chaintech,ZNF3-150}," #define VT1720_SUBDEVICE_K8X800 0xf217052c #define VT1720_SUBDEVICE_ZNF3_150 0x0f2741f6 extern struct snd_ice1712_card_info snd_vt1720_mobo_cards[]; #endif /* __SOUND_VT1720_MOBO_H */ Index: Makefile =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Makefile 18 May 2004 18:32:40 -0000 1.11 +++ Makefile 24 May 2004 13:18:20 -0000 1.12 @@ -5,7 +5,7 @@ snd-ice17xx-ak4xxx-objs := ak4xxx.o snd-ice1712-objs := ice1712.o delta.o hoontech.o ews.o -snd-ice1724-objs := ice1724.o amp.o revo.o aureon.o +snd-ice1724-objs := ice1724.o amp.o revo.o aureon.o vt1720_mobo.o # Toplevel Module Dependency obj-$(CONFIG_SND_ICE1712) += snd-ice1712.o snd-ice17xx-ak4xxx.o Index: ice1724.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1724.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- ice1724.c 18 May 2004 18:32:40 -0000 1.31 +++ ice1724.c 24 May 2004 13:18:20 -0000 1.32 @@ -44,6 +44,7 @@ #include "amp.h" #include "revo.h" #include "aureon.h" +#include "vt1720_mobo.h" MODULE_AUTHOR("Jaroslav Kysela <[EMAIL PROTECTED]>"); @@ -54,6 +55,7 @@ REVO_DEVICE_DESC AMP_AUDIO2000_DEVICE_DESC AUREON_DEVICE_DESC + VT1720_MOBO_DEVICE_DESC "{VIA,VT1720}," "{VIA,VT1724}," "{ICEnsemble,Generic ICE1724}," @@ -419,7 +421,7 @@ ice->cur_rate = rate; /* check MT02 */ - if (ice->eeprom.data[ICE_EEP2_ACLINK] & 0x80) { + if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) { val = old = inb(ICEMT1724(ice, I2S_FORMAT)); if (rate > 96000) val |= VT1724_MT_I2S_MCLK_128X; /* 128x MCLK */ @@ -448,7 +450,7 @@ } /* set up AC97 registers if needed */ - if (! (ice->eeprom.data[ICE_EEP2_ACLINK] & 0x80) && ice->ac97) { + if (! (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) && ice->ac97) { snd_ac97_set_rate(ice->ac97, AC97_PCM_FRONT_DAC_RATE, rate); snd_ac97_set_rate(ice->ac97, AC97_PCM_SURR_DAC_RATE, rate); snd_ac97_set_rate(ice->ac97, AC97_PCM_LFE_DAC_RATE, rate); @@ -698,7 +700,7 @@ static int set_rate_constraints(ice1712_t *ice, snd_pcm_substream_t *substream) { snd_pcm_runtime_t *runtime = substream->runtime; - if (ice->eeprom.data[ICE_EEP2_ACLINK] & 0x80) { + if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) { /* I2S */ if (ice->eeprom.data[ICE_EEP2_I2S] & 0x08) return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_192); @@ -1815,6 +1817,7 @@ snd_vt1724_revo_cards, snd_vt1724_amp_cards, snd_vt1724_aureon_cards, + snd_vt1720_mobo_cards, 0, }; @@ -1930,9 +1933,6 @@ outb(0, ICEREG1724(ice, POWERDOWN)); - /* read back to check the availability of SPDIF out */ - ice->eeprom.data[ICE_EEP2_SPDIF] = inb(ICEREG1724(ice, SPDIF_CFG)); - return 0; } ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog