[alsa-cvslog] CVS: alsa-utils configure.in,1.70,1.71
Update of /cvsroot/alsa/alsa-utils In directory sc8-pr-cvs1:/tmp/cvs-serv7949 Modified Files: configure.in Log Message: 1.0.0pre1 Index: configure.in === RCS file: /cvsroot/alsa/alsa-utils/configure.in,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- configure.in5 Nov 2003 11:08:25 - 1.70 +++ configure.in18 Nov 2003 16:27:35 - 1.71 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(alsamixer/alsamixer.c) AC_PREFIX_DEFAULT(/usr) -AM_INIT_AUTOMAKE(alsa-utils, 1.0.0) +AM_INIT_AUTOMAKE(alsa-utils, 1.0.0pre1) dnl Checks for programs. --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/include version.h,1.27,1.28
Update of /cvsroot/alsa/alsa-kernel/include In directory sc8-pr-cvs1:/tmp/cvs-serv31436 Modified Files: version.h Log Message: 1.0.0pre1 Index: version.h === RCS file: /cvsroot/alsa/alsa-kernel/include/version.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- version.h 21 Oct 2003 17:43:25 - 1.27 +++ version.h 18 Nov 2003 15:54:09 - 1.28 @@ -1,3 +1,3 @@ /* include/version.h. Generated by configure. */ -#define CONFIG_SND_VERSION "0.9.8" +#define CONFIG_SND_VERSION "1.0.0pre1" #define CONFIG_SND_DATE "" --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-tools Makefile,1.29,1.30
Update of /cvsroot/alsa/alsa-tools In directory sc8-pr-cvs1:/tmp/cvs-serv30667 Modified Files: Makefile Log Message: 1.0.0pre1 Index: Makefile === RCS file: /cvsroot/alsa/alsa-tools/Makefile,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- Makefile5 Nov 2003 11:09:19 - 1.29 +++ Makefile18 Nov 2003 15:51:59 - 1.30 @@ -1,4 +1,4 @@ -VERSION = 1.0.0 +VERSION = 1.0.0pre1 TOP = . SUBDIRS = ac3dec as10k1 envy24control hdsploader hdspconf hdspmixer \ mixartloader rmedigicontrol sb16_csp seq sscape_ctl us428control \ --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-oss configure.in,1.19,1.20
Update of /cvsroot/alsa/alsa-oss In directory sc8-pr-cvs1:/tmp/cvs-serv30759 Modified Files: configure.in Log Message: 1.0.0pre1 Index: configure.in === RCS file: /cvsroot/alsa/alsa-oss/configure.in,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- configure.in5 Nov 2003 11:17:08 - 1.19 +++ configure.in18 Nov 2003 15:52:24 - 1.20 @@ -1,5 +1,5 @@ AC_INIT(alsa-oss.c) -AM_INIT_AUTOMAKE(alsa-oss, 1.0.0) +AM_INIT_AUTOMAKE(alsa-oss, 1.0.0pre1) AC_PREFIX_DEFAULT(/usr) --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-driver configure.in,1.201,1.202
Update of /cvsroot/alsa/alsa-driver In directory sc8-pr-cvs1:/tmp/cvs-serv30536 Modified Files: configure.in Log Message: 1.0.0pre1 Index: configure.in === RCS file: /cvsroot/alsa/alsa-driver/configure.in,v retrieving revision 1.201 retrieving revision 1.202 diff -u -r1.201 -r1.202 --- configure.in11 Nov 2003 13:12:15 - 1.201 +++ configure.in18 Nov 2003 15:51:09 - 1.202 @@ -4,7 +4,7 @@ AC_INIT(acore/sound.patch) AC_PREFIX_DEFAULT(/usr) -CONFIG_SND_VERSION="0.9.8" +CONFIG_SND_VERSION="1.0.0pre1" dnl Checks for programs. AC_PROG_CC --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/pci via82xx.c,1.66,1.67
Update of /cvsroot/alsa/alsa-kernel/pci In directory sc8-pr-cvs1:/tmp/cvs-serv27431 Modified Files: via82xx.c Log Message: - fixed the (syntax) description of dxs_support module option. Index: via82xx.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/via82xx.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -r1.66 -r1.67 --- via82xx.c 3 Nov 2003 12:31:50 - 1.66 +++ via82xx.c 18 Nov 2003 15:31:14 - 1.67 @@ -106,7 +106,7 @@ MODULE_PARM_SYNTAX(ac97_clock, SNDRV_ENABLED ",default:48000"); MODULE_PARM(dxs_support, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA)"); -MODULE_PARM_SYNTAX(dxs_support, SNDRV_ENABLED ",allows:{{0,3}},dialog:list"); +MODULE_PARM_SYNTAX(dxs_support, SNDRV_ENABLED ",allows:{{0,4}},dialog:list"); /* pci ids */ --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/pci/ac97 ac97_pcm.c,1.1,1.2
Update of /cvsroot/alsa/alsa-kernel/pci/ac97 In directory sc8-pr-cvs1:/tmp/cvs-serv9205 Modified Files: ac97_pcm.c Log Message: - fixed oops. Index: ac97_pcm.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_pcm.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ac97_pcm.c 18 Nov 2003 11:38:40 - 1.1 +++ ac97_pcm.c 18 Nov 2003 13:52:59 - 1.2 @@ -392,8 +392,12 @@ rpcms = snd_kcalloc(sizeof(struct ac97_pcm), GFP_KERNEL); if (rpcms == NULL) return -ENOMEM; + memset(avail_slots, 0, sizeof(avail_slots)); + memset(all_slots, 0, sizeof(all_slots)); for (i = 0; i < 4; i++) { codec = bus->codec[i]; + if (! codec) + continue; avail_slots[0][i] = get_pslots(codec, &rate_table[0][i]); avail_slots[1][i] = get_cslots(codec); if (!(codec->scaps & AC97_SCAP_INDEP_SDIN)) { --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-driver/pci/ac97 ac97_pcm.c,NONE,1.1
Update of /cvsroot/alsa/alsa-driver/pci/ac97 In directory sc8-pr-cvs1:/tmp/cvs-serv25912 Added Files: ac97_pcm.c Log Message: Added missing file --- NEW FILE: ac97_pcm.c --- #define __NO_VERSION__ #include "../../alsa-kernel/pci/ac97/ac97_pcm.c" --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/include ac97_codec.h,1.35,1.36
Update of /cvsroot/alsa/alsa-kernel/include In directory sc8-pr-cvs1:/tmp/cvs-serv21327/include Modified Files: ac97_codec.h Log Message: Moved AC97 slot allocation from intel8x0 to ac97_pcm.c. Index: ac97_codec.h === RCS file: /cvsroot/alsa/alsa-kernel/include/ac97_codec.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- ac97_codec.h23 Oct 2003 14:34:52 - 1.35 +++ ac97_codec.h18 Nov 2003 11:38:40 - 1.36 @@ -83,6 +83,33 @@ #define AC97_VENDOR_ID10x7c/* Vendor ID1 */ #define AC97_VENDOR_ID20x7e/* Vendor ID2 / revision */ +/* slot allocation */ +#define AC97_SLOT_TAG 0 +#define AC97_SLOT_CMD_ADDR 1 +#define AC97_SLOT_CMD_DATA 2 +#define AC97_SLOT_PCM_LEFT 3 +#define AC97_SLOT_PCM_RIGHT4 +#define AC97_SLOT_MODEM_LINE1 5 +#define AC97_SLOT_PCM_CENTER 6 +#define AC97_SLOT_MIC 6 /* input */ +#define AC97_SLOT_SPDIF_LEFT1 6 +#define AC97_SLOT_PCM_SLEFT7 /* surround left */ +#define AC97_SLOT_PCM_LEFT_0 7 /* double rate operation */ +#define AC97_SLOT_SPDIF_LEFT 7 +#define AC97_SLOT_PCM_SRIGHT 8 /* surround right */ +#define AC97_SLOT_PCM_RIGHT_0 8 /* double rate operation */ +#define AC97_SLOT_SPDIF_RIGHT 8 +#define AC97_SLOT_LFE 9 +#define AC97_SLOT_SPDIF_RIGHT1 9 +#define AC97_SLOT_MODEM_LINE2 10 +#define AC97_SLOT_PCM_LEFT_1 10 /* double rate operation */ +#define AC97_SLOT_SPDIF_LEFT2 10 +#define AC97_SLOT_HANDSET 11 /* output */ +#define AC97_SLOT_PCM_RIGHT_1 11 /* double rate operation */ +#define AC97_SLOT_SPDIF_RIGHT2 11 +#define AC97_SLOT_MODEM_GPIO 12 /* modem GPIO */ +#define AC97_SLOT_PCM_CENTER_1 12 /* double rate operation */ + /* basic capabilities (reset register) */ #define AC97_BC_DEDICATED_MIC 0x0001 /* Dedicated Mic PCM In Channel */ #define AC97_BC_RESERVED1 0x0002 /* Reserved (was Modem Line Codec support) */ @@ -280,6 +307,7 @@ #define AC97_SCAP_CENTER_LFE_DAC (1<<3)/* center and LFE DACs are present */ #define AC97_SCAP_SKIP_AUDIO (1<<4) /* skip audio part of codec */ #define AC97_SCAP_SKIP_MODEM (1<<5) /* skip modem part of codec */ +#define AC97_SCAP_INDEP_SDIN (1<<6) /* independent SDIN */ /* ac97->flags */ #define AC97_HAS_PC_BEEP (1<<0) /* force PC Speaker usage */ @@ -303,6 +331,32 @@ typedef struct _snd_ac97_bus ac97_bus_t; typedef struct _snd_ac97 ac97_t; +enum ac97_pcm_cfg { + AC97_PCM_CFG_FRONT = 2, + AC97_PCM_CFG_REAR = 10, /* alias surround */ + AC97_PCM_CFG_LFE = 11, /* center + lfe */ + AC97_PCM_CFG_40 = 4,/* front + rear */ + AC97_PCM_CFG_51 = 6,/* front + rear + center/lfe */ + AC97_PCM_CFG_SPDIF = 20 +}; + +/* PCM allocation */ +struct ac97_pcm { + ac97_bus_t *bus; + unsigned int stream: 1,/* stream type: 1 = capture */ +exclusive: 1, /* exclusive mode, don't override with other pcms */ +copy_flag: 1; /* lowlevel driver must fill all entries */ + unsigned short aslots; /* active slots */ + unsigned int rates;/* available rates */ + struct { + unsigned short slots; /* driver input: requested AC97 slot numbers */ + unsigned short rslots[4]; /* allocated slots per codecs */ + unsigned char rate_table[4]; + ac97_t *codec[4]; /* allocated codecs */ + } r[2];/* 0 = standard rates, 1 = double rates */ + unsigned long private_value; /* used by the hardware driver */ +}; + struct snd_ac97_build_ops { int (*build_3d) (ac97_t *ac97); int (*build_specific) (ac97_t *ac97); @@ -321,8 +375,14 @@ void (*private_free) (ac97_bus_t *bus); /* --- */ snd_card_t *card; - unsigned int num; /* bus number */ - unsigned int clock; /* AC'97 clock (usually 48000Hz) */ + unsigned short num; /* bus number */ + unsigned short vra: 1, /* bridge supports VRA */ + isdin: 1;/* independent SDIN */ + unsigned int clock; /* AC'97 base clock (usually 48000Hz) */ + spinlock_t bus_lock;/* used mainly for slot allocation */ + unsigned short used_slots[2][4]; /* actually used PCM slots */ + unsigned short pcms_count; /* count of PCMs */ + struct ac97_pcm *pcms; ac97_t *codec[4]; snd_info_entry_t *proc; }; @@ -393,7 +453,6 @@ void snd_ac97_write_cache(ac97_t *ac97, unsigned short reg, unsigned short value); int snd_ac97_update(ac97_t *ac97, unsigned short reg, unsigned short value); int snd_ac97_update_bits(ac97_t *ac97, unsigned short reg, unsigned short mask, unsigned short value); -int snd_ac
[alsa-cvslog] CVS: alsa-kernel/pci/ac97 ac97_pcm.c,NONE,1.1 Makefile,1.12,1.13 ac97_codec.c,1.112,1.113
Update of /cvsroot/alsa/alsa-kernel/pci/ac97 In directory sc8-pr-cvs1:/tmp/cvs-serv21327/pci/ac97 Modified Files: Makefile ac97_codec.c Added Files: ac97_pcm.c Log Message: Moved AC97 slot allocation from intel8x0 to ac97_pcm.c. --- NEW FILE: ac97_pcm.c --- /* * Copyright (c) by Jaroslav Kysela <[EMAIL PROTECTED]> * Universal interface for Audio Codec '97 * * For more details look to AC '97 component specification revision 2.2 * by Intel Corporation (http://developer.intel.com) and to datasheets * for specific codecs. * * * 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 #include #include #include #include #include #include #include #include "ac97_patch.h" #include "ac97_id.h" #include "ac97_local.h" #define chip_t ac97_t /* * PCM support */ static unsigned char rate_reg_tables[2][4][9] = { { /* standard rates */ { /* 3&4 front, 7&8 rear, 6&9 center/lfe */ AC97_PCM_FRONT_DAC_RATE,/* slot 3 */ AC97_PCM_FRONT_DAC_RATE,/* slot 4 */ 0xff, /* slot 5 */ AC97_PCM_LFE_DAC_RATE, /* slot 6 */ AC97_PCM_SURR_DAC_RATE, /* slot 7 */ AC97_PCM_SURR_DAC_RATE, /* slot 8 */ AC97_PCM_LFE_DAC_RATE, /* slot 9 */ 0xff, /* slot 10 */ 0xff, /* slot 11 */ }, { /* 7&8 front, 6&9 rear, 10&11 center/lfe */ 0xff, /* slot 3 */ 0xff, /* slot 4 */ 0xff, /* slot 5 */ AC97_PCM_SURR_DAC_RATE, /* slot 6 */ AC97_PCM_FRONT_DAC_RATE,/* slot 7 */ AC97_PCM_FRONT_DAC_RATE,/* slot 8 */ AC97_PCM_SURR_DAC_RATE, /* slot 9 */ AC97_PCM_LFE_DAC_RATE, /* slot 10 */ AC97_PCM_LFE_DAC_RATE, /* slot 11 */ }, { /* 6&9 front, 10&11 rear, 3&4 center/lfe */ AC97_PCM_LFE_DAC_RATE, /* slot 3 */ AC97_PCM_LFE_DAC_RATE, /* slot 4 */ 0xff, /* slot 5 */ AC97_PCM_FRONT_DAC_RATE,/* slot 6 */ 0xff, /* slot 7 */ 0xff, /* slot 8 */ AC97_PCM_FRONT_DAC_RATE,/* slot 9 */ AC97_PCM_SURR_DAC_RATE, /* slot 10 */ AC97_PCM_SURR_DAC_RATE, /* slot 11 */ }, { /* 10&11 front, 3&4 rear, 7&8 center/lfe */ AC97_PCM_SURR_DAC_RATE, /* slot 3 */ AC97_PCM_SURR_DAC_RATE, /* slot 4 */ 0xff, /* slot 5 */ 0xff, /* slot 6 */ AC97_PCM_LFE_DAC_RATE, /* slot 7 */ AC97_PCM_LFE_DAC_RATE, /* slot 8 */ AC97_PCM_FRONT_DAC_RATE,/* slot 9 */ AC97_PCM_FRONT_DAC_RATE,/* slot 10 */ AC97_PCM_FRONT_DAC_RATE,/* slot 11 */ }, }, { /* FIXME: double rates */ { /* 3&4 front, 7&8 rear, 6&9 center/lfe */ AC97_PCM_FRONT_DAC_RATE,/* slot 3 */ AC97_PCM_FRONT_DAC_RATE,/* slot 4 */ 0xff, /* slot 5 */ AC97_PCM_LFE_DAC_RATE, /* slot 6 */ AC97_PCM_SURR_DAC_RATE, /* slot 7 */ AC97_PCM_SURR_DAC_RATE, /* slot 8 */ AC97_PCM_LFE_DAC_RATE, /* slot 9 */ 0xff, /* slot 10 */ 0xff, /* slot 11 */ }, { /* 7&8 front, 6&9 rear, 10&11 center/lfe */ 0xff, /* slot 3 */ 0xff, /* slot 4 */ 0xff, /* slot 5 */ AC97_PCM_SURR_DAC_RATE, /* slot 6 */ AC97_PCM_FRONT_DAC_RATE,/* slot 7 */ AC97_PCM_FRONT_DAC_RATE,/* slot 8 */ AC97_PCM_SURR_DAC_RATE, /* slot 9 */ AC97_PCM_LFE_DAC_RATE, /* slot 10 */ AC97_PCM_LFE_DAC_RATE, /* slot 11 */ }, { /* 6&9 front, 10&11 rear, 3&4 center/lfe */ AC97_PCM_LFE_DAC_RATE, /* slot 3 */ AC97_PCM_LFE_DAC_RATE, /* sl
[alsa-cvslog] CVS: alsa-kernel/pci intel8x0.c,1.96,1.97
Update of /cvsroot/alsa/alsa-kernel/pci In directory sc8-pr-cvs1:/tmp/cvs-serv21327/pci Modified Files: intel8x0.c Log Message: Moved AC97 slot allocation from intel8x0 to ac97_pcm.c. Index: intel8x0.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/intel8x0.c,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- intel8x0.c 23 Oct 2003 14:34:52 - 1.96 +++ intel8x0.c 18 Nov 2003 11:38:40 - 1.97 @@ -366,9 +366,8 @@ unsigned int roff_picb; unsigned int int_sta_mask; /* interrupt status mask */ unsigned int ali_slot; /* ALI DMA slot */ - ac97_t *ac97; - unsigned short ac97_rate_regs[3]; - int ac97_rates_idx; + struct ac97_pcm *pcm; + int pcm_open_flag; } ichdev_t; typedef struct _snd_intel8x0 intel8x0_t; @@ -887,11 +886,28 @@ static int snd_intel8x0_hw_params(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * hw_params) { - return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); + ichdev_t *ichdev = get_ichdev(substream); + int err; + + err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); + if (err < 0) + return err; + if (ichdev->pcm_open_flag) + snd_ac97_pcm_close(ichdev->pcm); + err = snd_ac97_pcm_open(ichdev->pcm, params_rate(hw_params), + params_channels(hw_params), + ichdev->pcm->r[0].slots); + if (err >= 0) + ichdev->pcm_open_flag = 1; + return err; } static int snd_intel8x0_hw_free(snd_pcm_substream_t * substream) { + ichdev_t *ichdev = get_ichdev(substream); + + if (ichdev->pcm_open_flag) + snd_ac97_pcm_close(ichdev->pcm); return snd_pcm_lib_free_pages(substream); } @@ -934,7 +950,6 @@ intel8x0_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; ichdev_t *ichdev = get_ichdev(substream); - int i; ichdev->physbuf = runtime->dma_addr; ichdev->size = snd_pcm_lib_buffer_bytes(substream); @@ -944,14 +959,9 @@ snd_intel8x0_setup_multi_channels(chip, runtime->channels); spin_unlock(&chip->reg_lock); } - if (ichdev->ac97) { - for (i = 0; i < 3; i++) - if (ichdev->ac97_rate_regs[i]) - snd_ac97_set_rate(ichdev->ac97, ichdev->ac97_rate_regs[i], runtime->rate); - /* FIXME: hack to enable spdif support */ - if (ichdev->ichd == ICHD_PCMOUT && chip->device_type == DEVICE_SIS) - snd_ac97_set_rate(ichdev->ac97, AC97_SPDIF, runtime->rate); - } + /* FIXME: hack to enable spdif support */ + if (ichdev->ichd == ICHD_PCMOUT && chip->device_type == DEVICE_SIS) + snd_ac97_set_rate(ichdev->pcm->r[0].codec[0], AC97_SPDIF, runtime->rate); snd_intel8x0_setup_periods(chip, ichdev); return 0; } @@ -1030,13 +1040,11 @@ ichdev->substream = substream; runtime->hw = snd_intel8x0_stream; - if (ichdev->ac97 && ichdev->ac97_rates_idx >= 0) { - runtime->hw.rates = ichdev->ac97->rates[ichdev->ac97_rates_idx]; - for (i = 0; i < ARRAY_SIZE(rates); i++) { - if (runtime->hw.rates & (1 << i)) { - runtime->hw.rate_min = rates[i]; - break; - } + runtime->hw.rates = ichdev->pcm->rates; + for (i = 0; i < ARRAY_SIZE(rates); i++) { + if (runtime->hw.rates & (1 << i)) { + runtime->hw.rate_min = rates[i]; + break; } } if (chip->device_type == DEVICE_SIS) { @@ -1512,7 +1520,7 @@ rec = tbl + i; if (i > 0 && rec->ac97_idx) { /* activate PCM only when associated AC'97 codec */ - if (! chip->ichd[rec->ac97_idx].ac97) + if (! chip->ichd[rec->ac97_idx].pcm) continue; } err = snd_intel8x0_pcm1(chip, device, rec); @@ -1542,44 +1550,67 @@ chip->ac97[ac97->num] = NULL; } -struct _ac97_rate_regs { - unsigned int ichd; - unsigned short regs[3]; - short rates_idx; -}; - -static struct _ac97_rate_regs intel_ac97_rate_regs[] __devinitdata = { - { ICHD_PCMOUT, { AC97_PCM_FRONT_DAC_RATE, AC97_PCM_SURR_DAC_RATE, AC97_PCM_LFE_DAC_RATE }, AC97_RATES_FRONT_DAC }, - { ICHD_PCMIN, { AC97_PCM_LR_ADC_RATE, 0, 0 }, AC97_RATES_ADC }, - { ICHD_MIC, { AC97_PCM_MIC_ADC_RATE, 0, 0 }, AC97_RATES_MIC_ADC }, - { ICHD_MIC2, { AC97_PCM_MIC_ADC_RATE, 0