Lines Matching defs:dreamcastcard

219 	struct snd_card_aica *dreamcastcard;
223 dreamcastcard = substream->pcm->private_data;
224 period_offset = dreamcastcard->clicks;
248 static void startup_aica(struct snd_card_aica *dreamcastcard)
251 dreamcastcard->channel, sizeof(struct aica_channel));
259 struct snd_card_aica *dreamcastcard;
260 dreamcastcard =
262 runtime = dreamcastcard->substream->runtime;
263 if (unlikely(dreamcastcard->dma_check == 0)) {
267 dreamcastcard->channel->flags |= 0x01;
269 dreamcastcard->substream);
270 startup_aica(dreamcastcard);
271 dreamcastcard->clicks =
277 dreamcastcard->substream);
278 snd_pcm_period_elapsed(dreamcastcard->substream);
279 dreamcastcard->clicks++;
280 if (unlikely(dreamcastcard->clicks >= AICA_PERIOD_NUMBER))
281 dreamcastcard->clicks %= AICA_PERIOD_NUMBER;
282 mod_timer(&dreamcastcard->timer, jiffies + 1);
288 struct snd_card_aica *dreamcastcard = from_timer(dreamcastcard,
290 struct snd_pcm_substream *substream = dreamcastcard->substream;
295 dreamcastcard = substream->pcm->private_data;
302 if (play_period == dreamcastcard->current_period) {
304 mod_timer(&(dreamcastcard->timer), jiffies + 1);
308 dreamcastcard->current_period = play_period;
309 if (unlikely(dreamcastcard->dma_check == 0))
310 dreamcastcard->dma_check = 1;
311 schedule_work(&(dreamcastcard->spu_dma_work));
316 struct snd_card_aica *dreamcastcard;
319 dreamcastcard = substream->pcm->private_data;
321 schedule_work(&(dreamcastcard->spu_dma_work));
322 mod_timer(&dreamcastcard->timer, jiffies + 4);
330 struct snd_card_aica *dreamcastcard;
333 dreamcastcard = substream->pcm->private_data;
340 channel->vol = dreamcastcard->master_volume;
344 dreamcastcard->channel = channel;
348 dreamcastcard->clicks = 0;
349 dreamcastcard->current_period = 0;
350 dreamcastcard->dma_check = 0;
357 struct snd_card_aica *dreamcastcard = substream->pcm->private_data;
358 flush_work(&(dreamcastcard->spu_dma_work));
359 del_timer(&dreamcastcard->timer);
360 dreamcastcard->substream = NULL;
361 kfree(dreamcastcard->channel);
369 struct snd_card_aica *dreamcastcard = substream->pcm->private_data;
371 dreamcastcard->channel->sfmt = SM_16BIT;
372 dreamcastcard->channel->freq = substream->runtime->rate;
373 dreamcastcard->substream = substream;
409 *dreamcastcard, int pcm_index)
415 snd_pcm_new(dreamcastcard->card, "AICA PCM", pcm_index, 1, 0,
419 pcm->private_data = dreamcastcard;
465 struct snd_card_aica *dreamcastcard;
466 dreamcastcard = kcontrol->private_data;
467 if (unlikely(!dreamcastcard->channel))
469 ucontrol->value.integer.value[0] = dreamcastcard->channel->vol;
476 struct snd_card_aica *dreamcastcard;
478 dreamcastcard = kcontrol->private_data;
479 if (unlikely(!dreamcastcard->channel))
484 if (unlikely(dreamcastcard->channel->vol == vol))
486 dreamcastcard->channel->vol = ucontrol->value.integer.value[0];
487 dreamcastcard->master_volume = ucontrol->value.integer.value[0];
489 dreamcastcard->channel, sizeof(struct aica_channel));
527 static int add_aicamixer_controls(struct snd_card_aica *dreamcastcard)
531 (dreamcastcard->card,
532 snd_ctl_new1(&snd_aica_pcmvolume_control, dreamcastcard));
536 (dreamcastcard->card,
537 snd_ctl_new1(&snd_aica_pcmswitch_control, dreamcastcard));
545 struct snd_card_aica *dreamcastcard;
546 dreamcastcard = platform_get_drvdata(devptr);
547 if (unlikely(!dreamcastcard))
549 snd_card_free(dreamcastcard->card);
550 kfree(dreamcastcard);
557 struct snd_card_aica *dreamcastcard;
558 dreamcastcard = kzalloc(sizeof(struct snd_card_aica), GFP_KERNEL);
559 if (unlikely(!dreamcastcard))
562 THIS_MODULE, 0, &dreamcastcard->card);
564 kfree(dreamcastcard);
567 strcpy(dreamcastcard->card->driver, "snd_aica");
568 strcpy(dreamcastcard->card->shortname, SND_AICA_DRIVER);
569 strcpy(dreamcastcard->card->longname,
572 INIT_WORK(&(dreamcastcard->spu_dma_work), run_spu_dma);
573 timer_setup(&dreamcastcard->timer, aica_period_elapsed, 0);
575 err = snd_aicapcmchip(dreamcastcard, 0);
579 err = add_aicamixer_controls(dreamcastcard);
583 err = snd_card_register(dreamcastcard->card);
586 platform_set_drvdata(devptr, dreamcastcard);
591 snd_card_free(dreamcastcard->card);
592 kfree(dreamcastcard);