X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fisa%2Fgus%2Fgus_pcm.c;h=c7f95e7aa018513be58cc557a6a984369085bf6e;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=8995ad9c516d0c33dfe063da63780af087838b38;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index 8995ad9c5..c7f95e7aa 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c @@ -42,12 +42,12 @@ #define SNDRV_GF1_PCM_PFLG_ACTIVE (1<<0) #define SNDRV_GF1_PCM_PFLG_NEUTRAL (2<<0) -typedef struct { - snd_gus_card_t * gus; - snd_pcm_substream_t * substream; +struct gus_pcm_private { + struct snd_gus_card * gus; + struct snd_pcm_substream *substream; spinlock_t lock; unsigned int voices; - snd_gus_voice_t *pvoices[2]; + struct snd_gus_voice *pvoices[2]; unsigned int memory; unsigned short flags; unsigned char voice_ctrl, ramp_ctrl; @@ -58,13 +58,13 @@ typedef struct { wait_queue_head_t sleep; atomic_t dma_count; int final_volume; -} gus_pcm_private_t; +}; static int snd_gf1_pcm_use_dma = 1; -static void snd_gf1_pcm_block_change_ack(snd_gus_card_t * gus, void *private_data) +static void snd_gf1_pcm_block_change_ack(struct snd_gus_card * gus, void *private_data) { - gus_pcm_private_t *pcmp = private_data; + struct gus_pcm_private *pcmp = private_data; if (pcmp) { atomic_dec(&pcmp->dma_count); @@ -72,14 +72,14 @@ static void snd_gf1_pcm_block_change_ack(snd_gus_card_t * gus, void *private_dat } } -static int snd_gf1_pcm_block_change(snd_pcm_substream_t * substream, +static int snd_gf1_pcm_block_change(struct snd_pcm_substream *substream, unsigned int offset, unsigned int addr, unsigned int count) { - snd_gf1_dma_block_t block; - snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = runtime->private_data; + struct snd_gf1_dma_block block; + struct snd_pcm_runtime *runtime = substream->runtime; + struct gus_pcm_private *pcmp = runtime->private_data; count += offset & 31; offset &= ~31; @@ -101,11 +101,11 @@ static int snd_gf1_pcm_block_change(snd_pcm_substream_t * substream, return 0; } -static void snd_gf1_pcm_trigger_up(snd_pcm_substream_t * substream) +static void snd_gf1_pcm_trigger_up(struct snd_pcm_substream *substream) { - snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = runtime->private_data; - snd_gus_card_t * gus = pcmp->gus; + struct snd_pcm_runtime *runtime = substream->runtime; + struct gus_pcm_private *pcmp = runtime->private_data; + struct snd_gus_card * gus = pcmp->gus; unsigned long flags; unsigned char voice_ctrl, ramp_ctrl; unsigned short rate; @@ -114,8 +114,6 @@ static void snd_gf1_pcm_trigger_up(snd_pcm_substream_t * substream) unsigned char pan; unsigned int voice; - if (substream == NULL) - return; spin_lock_irqsave(&pcmp->lock, flags); if (pcmp->flags & SNDRV_GF1_PCM_PFLG_ACTIVE) { spin_unlock_irqrestore(&pcmp->lock, flags); @@ -179,10 +177,11 @@ static void snd_gf1_pcm_trigger_up(snd_pcm_substream_t * substream) spin_unlock_irqrestore(&gus->reg_lock, flags); } -static void snd_gf1_pcm_interrupt_wave(snd_gus_card_t * gus, snd_gus_voice_t *pvoice) +static void snd_gf1_pcm_interrupt_wave(struct snd_gus_card * gus, + struct snd_gus_voice *pvoice) { - gus_pcm_private_t * pcmp; - snd_pcm_runtime_t * runtime; + struct gus_pcm_private * pcmp; + struct snd_pcm_runtime *runtime; unsigned char voice_ctrl, ramp_ctrl; unsigned int idx; unsigned int end, step; @@ -261,11 +260,12 @@ static void snd_gf1_pcm_interrupt_wave(snd_gus_card_t * gus, snd_gus_voice_t *pv #endif } -static void snd_gf1_pcm_interrupt_volume(snd_gus_card_t * gus, snd_gus_voice_t * pvoice) +static void snd_gf1_pcm_interrupt_volume(struct snd_gus_card * gus, + struct snd_gus_voice * pvoice) { unsigned short vol; int cvoice; - gus_pcm_private_t *pcmp = pvoice->private_data; + struct gus_pcm_private *pcmp = pvoice->private_data; /* stop ramp, but leave rollover bit untouched */ spin_lock(&gus->reg_lock); @@ -289,11 +289,11 @@ static void snd_gf1_pcm_interrupt_volume(snd_gus_card_t * gus, snd_gus_voice_t * spin_unlock(&gus->reg_lock); } -static void snd_gf1_pcm_volume_change(snd_gus_card_t * gus) +static void snd_gf1_pcm_volume_change(struct snd_gus_card * gus) { } -static int snd_gf1_pcm_poke_block(snd_gus_card_t *gus, unsigned char *buf, +static int snd_gf1_pcm_poke_block(struct snd_gus_card *gus, unsigned char *buf, unsigned int pos, unsigned int count, int w16, int invert) { @@ -333,8 +333,7 @@ static int snd_gf1_pcm_poke_block(snd_gus_card_t *gus, unsigned char *buf, } } if (count > 0 && !in_interrupt()) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(1); + schedule_timeout_interruptible(1); if (signal_pending(current)) return -EAGAIN; } @@ -342,14 +341,14 @@ static int snd_gf1_pcm_poke_block(snd_gus_card_t *gus, unsigned char *buf, return 0; } -static int snd_gf1_pcm_playback_copy(snd_pcm_substream_t *substream, +static int snd_gf1_pcm_playback_copy(struct snd_pcm_substream *substream, int voice, snd_pcm_uframes_t pos, void __user *src, snd_pcm_uframes_t count) { - snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = runtime->private_data; + struct snd_pcm_runtime *runtime = substream->runtime; + struct gus_pcm_private *pcmp = runtime->private_data; unsigned int bpos, len; bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2)); @@ -361,7 +360,7 @@ static int snd_gf1_pcm_playback_copy(snd_pcm_substream_t *substream, if (snd_gf1_pcm_use_dma && len > 32) { return snd_gf1_pcm_block_change(substream, bpos, pcmp->memory + bpos, len); } else { - snd_gus_card_t *gus = pcmp->gus; + struct snd_gus_card *gus = pcmp->gus; int err, w16, invert; w16 = (snd_pcm_format_width(runtime->format) == 16); @@ -372,13 +371,13 @@ static int snd_gf1_pcm_playback_copy(snd_pcm_substream_t *substream, return 0; } -static int snd_gf1_pcm_playback_silence(snd_pcm_substream_t *substream, +static int snd_gf1_pcm_playback_silence(struct snd_pcm_substream *substream, int voice, snd_pcm_uframes_t pos, snd_pcm_uframes_t count) { - snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = runtime->private_data; + struct snd_pcm_runtime *runtime = substream->runtime; + struct gus_pcm_private *pcmp = runtime->private_data; unsigned int bpos, len; bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2)); @@ -389,7 +388,7 @@ static int snd_gf1_pcm_playback_silence(snd_pcm_substream_t *substream, if (snd_gf1_pcm_use_dma && len > 32) { return snd_gf1_pcm_block_change(substream, bpos, pcmp->memory + bpos, len); } else { - snd_gus_card_t *gus = pcmp->gus; + struct snd_gus_card *gus = pcmp->gus; int err, w16, invert; w16 = (snd_pcm_format_width(runtime->format) == 16); @@ -400,18 +399,18 @@ static int snd_gf1_pcm_playback_silence(snd_pcm_substream_t *substream, return 0; } -static int snd_gf1_pcm_playback_hw_params(snd_pcm_substream_t * substream, - snd_pcm_hw_params_t * hw_params) +static int snd_gf1_pcm_playback_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *hw_params) { - snd_gus_card_t *gus = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = runtime->private_data; + struct snd_gus_card *gus = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct gus_pcm_private *pcmp = runtime->private_data; int err; if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) return err; if (err > 0) { /* change */ - snd_gf1_mem_block_t *block; + struct snd_gf1_mem_block *block; if (pcmp->memory > 0) { snd_gf1_mem_free(&gus->gf1.mem_alloc, pcmp->memory); pcmp->memory = 0; @@ -449,10 +448,10 @@ static int snd_gf1_pcm_playback_hw_params(snd_pcm_substream_t * substream, return 0; } -static int snd_gf1_pcm_playback_hw_free(snd_pcm_substream_t * substream) +static int snd_gf1_pcm_playback_hw_free(struct snd_pcm_substream *substream) { - snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = runtime->private_data; + struct snd_pcm_runtime *runtime = substream->runtime; + struct gus_pcm_private *pcmp = runtime->private_data; snd_pcm_lib_free_pages(substream); if (pcmp->pvoices[0]) { @@ -470,10 +469,10 @@ static int snd_gf1_pcm_playback_hw_free(snd_pcm_substream_t * substream) return 0; } -static int snd_gf1_pcm_playback_prepare(snd_pcm_substream_t * substream) +static int snd_gf1_pcm_playback_prepare(struct snd_pcm_substream *substream) { - snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = runtime->private_data; + struct snd_pcm_runtime *runtime = substream->runtime; + struct gus_pcm_private *pcmp = runtime->private_data; pcmp->bpos = 0; pcmp->dma_size = snd_pcm_lib_buffer_bytes(substream); @@ -482,12 +481,12 @@ static int snd_gf1_pcm_playback_prepare(snd_pcm_substream_t * substream) return 0; } -static int snd_gf1_pcm_playback_trigger(snd_pcm_substream_t * substream, +static int snd_gf1_pcm_playback_trigger(struct snd_pcm_substream *substream, int cmd) { - snd_gus_card_t *gus = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = runtime->private_data; + struct snd_gus_card *gus = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct gus_pcm_private *pcmp = runtime->private_data; int voice; if (cmd == SNDRV_PCM_TRIGGER_START) { @@ -508,11 +507,11 @@ static int snd_gf1_pcm_playback_trigger(snd_pcm_substream_t * substream, return 0; } -static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(snd_pcm_substream_t * substream) +static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(struct snd_pcm_substream *substream) { - snd_gus_card_t *gus = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = runtime->private_data; + struct snd_gus_card *gus = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct gus_pcm_private *pcmp = runtime->private_data; unsigned int pos; unsigned char voice_ctrl; @@ -530,22 +529,22 @@ static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(snd_pcm_substream_t * subs return pos; } -static ratnum_t clock = { +static struct snd_ratnum clock = { .num = 9878400/16, .den_min = 2, .den_max = 257, .den_step = 1, }; -static snd_pcm_hw_constraint_ratnums_t hw_constraints_clocks = { +static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = { .nrats = 1, .rats = &clock, }; -static int snd_gf1_pcm_capture_hw_params(snd_pcm_substream_t * substream, - snd_pcm_hw_params_t * hw_params) +static int snd_gf1_pcm_capture_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *hw_params) { - snd_gus_card_t *gus = snd_pcm_substream_chip(substream); + struct snd_gus_card *gus = snd_pcm_substream_chip(substream); gus->c_dma_size = params_buffer_bytes(hw_params); gus->c_period_size = params_period_bytes(hw_params); @@ -560,15 +559,15 @@ static int snd_gf1_pcm_capture_hw_params(snd_pcm_substream_t * substream, return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); } -static int snd_gf1_pcm_capture_hw_free(snd_pcm_substream_t * substream) +static int snd_gf1_pcm_capture_hw_free(struct snd_pcm_substream *substream) { return snd_pcm_lib_free_pages(substream); } -static int snd_gf1_pcm_capture_prepare(snd_pcm_substream_t * substream) +static int snd_gf1_pcm_capture_prepare(struct snd_pcm_substream *substream) { - snd_gus_card_t *gus = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; + struct snd_gus_card *gus = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; snd_gf1_i_write8(gus, SNDRV_GF1_GB_RECORD_RATE, runtime->rate_den - 2); snd_gf1_i_write8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL, 0); /* disable sampling */ @@ -577,10 +576,10 @@ static int snd_gf1_pcm_capture_prepare(snd_pcm_substream_t * substream) return 0; } -static int snd_gf1_pcm_capture_trigger(snd_pcm_substream_t * substream, +static int snd_gf1_pcm_capture_trigger(struct snd_pcm_substream *substream, int cmd) { - snd_gus_card_t *gus = snd_pcm_substream_chip(substream); + struct snd_gus_card *gus = snd_pcm_substream_chip(substream); int val; if (cmd == SNDRV_PCM_TRIGGER_START) { @@ -598,15 +597,15 @@ static int snd_gf1_pcm_capture_trigger(snd_pcm_substream_t * substream, return 0; } -static snd_pcm_uframes_t snd_gf1_pcm_capture_pointer(snd_pcm_substream_t * substream) +static snd_pcm_uframes_t snd_gf1_pcm_capture_pointer(struct snd_pcm_substream *substream) { - snd_gus_card_t *gus = snd_pcm_substream_chip(substream); + struct snd_gus_card *gus = snd_pcm_substream_chip(substream); int pos = snd_dma_pointer(gus->gf1.dma2, gus->c_period_size); pos = bytes_to_frames(substream->runtime, (gus->c_pos + pos) % gus->c_dma_size); return pos; } -static void snd_gf1_pcm_interrupt_dma_read(snd_gus_card_t * gus) +static void snd_gf1_pcm_interrupt_dma_read(struct snd_gus_card * gus) { snd_gf1_i_write8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL, 0); /* disable sampling */ snd_gf1_i_look8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL); /* Sampling Control Register */ @@ -618,7 +617,7 @@ static void snd_gf1_pcm_interrupt_dma_read(snd_gus_card_t * gus) } } -static snd_pcm_hardware_t snd_gf1_pcm_playback = +static struct snd_pcm_hardware snd_gf1_pcm_playback = { .info = SNDRV_PCM_INFO_NONINTERLEAVED, .formats = (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | @@ -636,7 +635,7 @@ static snd_pcm_hardware_t snd_gf1_pcm_playback = .fifo_size = 0, }; -static snd_pcm_hardware_t snd_gf1_pcm_capture = +static struct snd_pcm_hardware snd_gf1_pcm_capture = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_MMAP_VALID), @@ -654,20 +653,19 @@ static snd_pcm_hardware_t snd_gf1_pcm_capture = .fifo_size = 0, }; -static void snd_gf1_pcm_playback_free(snd_pcm_runtime_t *runtime) +static void snd_gf1_pcm_playback_free(struct snd_pcm_runtime *runtime) { - gus_pcm_private_t * pcmp = runtime->private_data; - kfree(pcmp); + kfree(runtime->private_data); } -static int snd_gf1_pcm_playback_open(snd_pcm_substream_t *substream) +static int snd_gf1_pcm_playback_open(struct snd_pcm_substream *substream) { - gus_pcm_private_t *pcmp; - snd_gus_card_t *gus = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; + struct gus_pcm_private *pcmp; + struct snd_gus_card *gus = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; int err; - pcmp = kcalloc(1, sizeof(*pcmp), GFP_KERNEL); + pcmp = kzalloc(sizeof(*pcmp), GFP_KERNEL); if (pcmp == NULL) return -ENOMEM; pcmp->gus = gus; @@ -692,23 +690,23 @@ static int snd_gf1_pcm_playback_open(snd_pcm_substream_t *substream) return 0; } -static int snd_gf1_pcm_playback_close(snd_pcm_substream_t * substream) +static int snd_gf1_pcm_playback_close(struct snd_pcm_substream *substream) { - snd_gus_card_t *gus = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = runtime->private_data; + struct snd_gus_card *gus = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct gus_pcm_private *pcmp = runtime->private_data; if (!wait_event_timeout(pcmp->sleep, (atomic_read(&pcmp->dma_count) <= 0), 2*HZ)) - snd_printk("gf1 pcm - serious DMA problem\n"); + snd_printk(KERN_ERR "gf1 pcm - serious DMA problem\n"); snd_gf1_dma_done(gus); return 0; } -static int snd_gf1_pcm_capture_open(snd_pcm_substream_t * substream) +static int snd_gf1_pcm_capture_open(struct snd_pcm_substream *substream) { - snd_pcm_runtime_t *runtime = substream->runtime; - snd_gus_card_t *gus = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_gus_card *gus = snd_pcm_substream_chip(substream); gus->gf1.interrupt_handler_dma_read = snd_gf1_pcm_interrupt_dma_read; gus->pcm_cap_substream = substream; @@ -720,23 +718,16 @@ static int snd_gf1_pcm_capture_open(snd_pcm_substream_t * substream) return 0; } -static int snd_gf1_pcm_capture_close(snd_pcm_substream_t * substream) +static int snd_gf1_pcm_capture_close(struct snd_pcm_substream *substream) { - snd_gus_card_t *gus = snd_pcm_substream_chip(substream); + struct snd_gus_card *gus = snd_pcm_substream_chip(substream); gus->pcm_cap_substream = NULL; snd_gf1_set_default_handlers(gus, SNDRV_GF1_HANDLER_DMA_READ); return 0; } -static void snd_gf1_pcm_free(snd_pcm_t *pcm) -{ - snd_gus_card_t *gus = pcm->private_data; - gus->pcm = NULL; - snd_pcm_lib_preallocate_free_for_all(pcm); -} - -static int snd_gf1_pcm_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_gf1_pcm_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; @@ -745,9 +736,9 @@ static int snd_gf1_pcm_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t return 0; } -static int snd_gf1_pcm_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) +static int snd_gf1_pcm_volume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol); + struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); unsigned long flags; spin_lock_irqsave(&gus->pcm_volume_level_lock, flags); @@ -757,15 +748,15 @@ static int snd_gf1_pcm_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ return 0; } -static int snd_gf1_pcm_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) +static int snd_gf1_pcm_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol); + struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); unsigned long flags; int change; unsigned int idx; unsigned short val1, val2, vol; - gus_pcm_private_t *pcmp; - snd_gus_voice_t *pvoice; + struct gus_pcm_private *pcmp; + struct snd_gus_voice *pvoice; val1 = ucontrol->value.integer.value[0] & 127; val2 = ucontrol->value.integer.value[1] & 127; @@ -799,7 +790,7 @@ static int snd_gf1_pcm_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ return change; } -static snd_kcontrol_new_t snd_gf1_pcm_volume_control = +static struct snd_kcontrol_new snd_gf1_pcm_volume_control = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "PCM Playback Volume", @@ -808,7 +799,7 @@ static snd_kcontrol_new_t snd_gf1_pcm_volume_control = .put = snd_gf1_pcm_volume_put }; -static snd_kcontrol_new_t snd_gf1_pcm_volume_control1 = +static struct snd_kcontrol_new snd_gf1_pcm_volume_control1 = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "GPCM Playback Volume", @@ -817,7 +808,7 @@ static snd_kcontrol_new_t snd_gf1_pcm_volume_control1 = .put = snd_gf1_pcm_volume_put }; -static snd_pcm_ops_t snd_gf1_pcm_playback_ops = { +static struct snd_pcm_ops snd_gf1_pcm_playback_ops = { .open = snd_gf1_pcm_playback_open, .close = snd_gf1_pcm_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -830,7 +821,7 @@ static snd_pcm_ops_t snd_gf1_pcm_playback_ops = { .silence = snd_gf1_pcm_playback_silence, }; -static snd_pcm_ops_t snd_gf1_pcm_capture_ops = { +static struct snd_pcm_ops snd_gf1_pcm_capture_ops = { .open = snd_gf1_pcm_capture_open, .close = snd_gf1_pcm_capture_close, .ioctl = snd_pcm_lib_ioctl, @@ -841,12 +832,12 @@ static snd_pcm_ops_t snd_gf1_pcm_capture_ops = { .pointer = snd_gf1_pcm_capture_pointer, }; -int snd_gf1_pcm_new(snd_gus_card_t * gus, int pcm_dev, int control_index, snd_pcm_t ** rpcm) +int snd_gf1_pcm_new(struct snd_gus_card * gus, int pcm_dev, int control_index, struct snd_pcm ** rpcm) { - snd_card_t *card; - snd_kcontrol_t *kctl; - snd_pcm_t *pcm; - snd_pcm_substream_t *substream; + struct snd_card *card; + struct snd_kcontrol *kctl; + struct snd_pcm *pcm; + struct snd_pcm_substream *substream; int capture, err; if (rpcm) @@ -862,7 +853,6 @@ int snd_gf1_pcm_new(snd_gus_card_t * gus, int pcm_dev, int control_index, snd_pc if (err < 0) return err; pcm->private_data = gus; - pcm->private_free = snd_gf1_pcm_free; /* playback setup */ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_gf1_pcm_playback_ops);