/* prepare callback for playback and capture on via686  */
static void via686_setup_format(struct via82xx *chip, struct viadev *viadev, struct snd_pcm_runtime *runtime)
/* prepare callback for playback and capture on via686  */
static void via686_setup_format(struct via82xx *chip, struct viadev *viadev, struct snd_pcm_runtime *runtime)
{
	snd_via82xx_channel_reset(chip, viadev);
	snd_via82xx_set_table_ptr(chip, viadev);
	outb(VIA_REG_TYPE_AUTOSTART |
	     (runtime->format == SNDRV_PCM_FORMAT_S16_LE ? VIA_REG_TYPE_16BIT : 0) |
	     (runtime->channels > 1 ? VIA_REG_TYPE_STEREO : 0) |
	     ((viadev->reg_offset & 0x10) == 0 ? VIA_REG_TYPE_INT_LSAMPLE : 0) |
	     VIA_REG_TYPE_INT_EOL |
	     VIA_REG_TYPE_INT_FLAG, VIADEV_REG(viadev, OFFSET_TYPE));
}