Update of /cvsroot/alsa/alsa-kernel/pci In directory sc8-pr-cvs1:/tmp/cvs-serv28208/pci
Modified Files: intel8x0.c Log Message: - added spdif field to struct ac97_pcm. - snd_ac97_set_rate() accepts AC97_SPDIF. - allow fixed rate mic capture. - optimized the loop in snd_ac97_pcm_open. Index: intel8x0.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/intel8x0.c,v retrieving revision 1.98 retrieving revision 1.99 diff -u -r1.98 -r1.99 --- intel8x0.c 20 Nov 2003 15:59:32 -0000 1.98 +++ intel8x0.c 3 Dec 2003 13:39:06 -0000 1.99 @@ -886,6 +886,7 @@ static int snd_intel8x0_hw_params(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * hw_params) { + intel8x0_t *chip = snd_pcm_substream_chip(substream); ichdev_t *ichdev = get_ichdev(substream); int err; @@ -899,8 +900,12 @@ err = snd_ac97_pcm_open(ichdev->pcm, params_rate(hw_params), params_channels(hw_params), ichdev->pcm->r[0].slots); - if (err >= 0) + if (err >= 0) { ichdev->pcm_open_flag = 1; + /* 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, params_rate(hw_params)); + } return err; } @@ -963,9 +968,6 @@ snd_intel8x0_setup_multi_channels(chip, runtime->channels); spin_unlock(&chip->reg_lock); } - /* 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; } @@ -1590,6 +1592,7 @@ /* S/PDIF PCM */ { .exclusive = 1, + .spdif = 1, .r = { { .slots = (1 << AC97_SLOT_SPDIF_LEFT2) | (1 << AC97_SLOT_SPDIF_RIGHT2) ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog