ALSA: ctxfi - Support SG-buffers
[linux-2.6.git] / sound / pci / ctxfi / ctpcm.c
index 26d86dc35e52f32d81e52b3670a1b2d46f2a3b52..52ddf19d83bb43b53e7ff1d242f76835de5372d3 100644 (file)
@@ -442,6 +442,7 @@ static struct snd_pcm_ops ct_pcm_playback_ops = {
        .prepare        = ct_pcm_playback_prepare,
        .trigger        = ct_pcm_playback_trigger,
        .pointer        = ct_pcm_playback_pointer,
+       .page           = snd_pcm_sgbuf_ops_page,
 };
 
 /* PCM operators for capture */
@@ -454,6 +455,7 @@ static struct snd_pcm_ops ct_pcm_capture_ops = {
        .prepare        = ct_pcm_capture_prepare,
        .trigger        = ct_pcm_capture_trigger,
        .pointer        = ct_pcm_capture_pointer,
+       .page           = snd_pcm_sgbuf_ops_page,
 };
 
 /* Create ALSA pcm device */
@@ -485,7 +487,7 @@ int ct_alsa_pcm_create(struct ct_atc *atc,
                snd_pcm_set_ops(pcm,
                                SNDRV_PCM_STREAM_CAPTURE, &ct_pcm_capture_ops);
 
-       snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+       snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
                        snd_dma_pci_data(atc->pci), 128*1024, 128*1024);
 
        return 0;