64*1024, 64*1024)) < 0) /* FIXME: 32*1024 for sound buffer, between 32and64 for Periods table. */ 
((65536 - 64) * 8), ((65536 - 64) * 8))) < 0) 
int snd_p16v_pcm(emu10k1_t *emu, int device, snd_pcm_t **rpcm){	snd_pcm_t *pcm;	snd_pcm_substream_t *substream;	int err;        int capture=1;  	//snd_printk("snd_p16v_pcm called. device=%d\n", device);	emu->p16v_device_offset = device;	if (rpcm)		*rpcm = NULL;	if ((err = snd_pcm_new(emu->card, "p16v", device, 1, capture, &pcm)) < 0)		return err;  	pcm->private_data = emu;	pcm->private_free = snd_p16v_pcm_free;	// Single playback 8 channel device.	// Single capture 2 channel device.	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_p16v_playback_front_ops);	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_p16v_capture_ops);	pcm->info_flags = 0;	pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;	strcpy(pcm->name, "p16v");	emu->pcm = pcm;	for(substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; 	    substream; 	    substream = substream->next) {		if ((err = snd_pcm_lib_preallocate_pages(substream, 							 SNDRV_DMA_TYPE_DEV, 							 snd_dma_pci_data(emu->pci), 							 64*1024, 64*1024)) < 0) /* FIXME: 32*1024 for sound buffer, between 32and64 for Periods table. */			return err;		//snd_printk("preallocate playback substream: err=%d\n", err);	}	for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; 	      substream; 	      substream = substream->next) { 		if ((err = snd_pcm_lib_preallocate_pages(substream, 	                                           SNDRV_DMA_TYPE_DEV, 	                                           snd_dma_pci_data(emu->pci), 	                                           64*1024, 64*1024)) < 0)			return err;		//snd_printk("preallocate capture substream: err=%d\n", err);	}  	if (rpcm)		*rpcm = pcm;  	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/310bacd29230abf5f2a230159e48e983171e0f26/p16v.c/buggy/sound/pci/emu10k1/p16v.c