Lines Matching defs:dreamcastcard
238 struct snd_card_aica *dreamcastcard;
242 dreamcastcard = substream->pcm->private_data;
243 period_offset = dreamcastcard->clicks;
267 static void startup_aica(struct snd_card_aica *dreamcastcard)
270 dreamcastcard->channel, sizeof(struct aica_channel));
278 struct snd_card_aica *dreamcastcard;
279 dreamcastcard =
281 runtime = dreamcastcard->substream->runtime;
282 if (unlikely(dreamcastcard->dma_check == 0)) {
286 dreamcastcard->channel->flags |= 0x01;
288 dreamcastcard->substream);
289 startup_aica(dreamcastcard);
290 dreamcastcard->clicks =
296 dreamcastcard->substream);
297 snd_pcm_period_elapsed(dreamcastcard->substream);
298 dreamcastcard->clicks++;
299 if (unlikely(dreamcastcard->clicks >= AICA_PERIOD_NUMBER))
300 dreamcastcard->clicks %= AICA_PERIOD_NUMBER;
301 mod_timer(&dreamcastcard->timer, jiffies + 1);
311 struct snd_card_aica *dreamcastcard;
314 dreamcastcard = substream->pcm->private_data;
321 if (play_period == dreamcastcard->current_period) {
323 mod_timer(&(dreamcastcard->timer), jiffies + 1);
327 dreamcastcard->current_period = play_period;
328 if (unlikely(dreamcastcard->dma_check == 0))
329 dreamcastcard->dma_check = 1;
330 queue_work(aica_queue, &(dreamcastcard->spu_dma_work));
335 struct snd_card_aica *dreamcastcard;
338 dreamcastcard = substream->pcm->private_data;
340 queue_work(aica_queue, &(dreamcastcard->spu_dma_work));
342 if (unlikely(dreamcastcard->timer.data)) {
343 mod_timer(&dreamcastcard->timer, jiffies + 4);
346 init_timer(&(dreamcastcard->timer));
347 dreamcastcard->timer.data = (unsigned long) substream;
348 dreamcastcard->timer.function = aica_period_elapsed;
349 dreamcastcard->timer.expires = jiffies + 4;
350 add_timer(&(dreamcastcard->timer));
358 struct snd_card_aica *dreamcastcard;
361 dreamcastcard = substream->pcm->private_data;
368 channel->vol = dreamcastcard->master_volume;
372 dreamcastcard->channel = channel;
376 dreamcastcard->clicks = 0;
377 dreamcastcard->current_period = 0;
378 dreamcastcard->dma_check = 0;
385 struct snd_card_aica *dreamcastcard = substream->pcm->private_data;
387 if (dreamcastcard->timer.data)
388 del_timer(&dreamcastcard->timer);
389 kfree(dreamcastcard->channel);
414 struct snd_card_aica *dreamcastcard = substream->pcm->private_data;
416 dreamcastcard->channel->sfmt = SM_16BIT;
417 dreamcastcard->channel->freq = substream->runtime->rate;
418 dreamcastcard->substream = substream;
457 *dreamcastcard, int pcm_index)
463 snd_pcm_new(dreamcastcard->card, "AICA PCM", pcm_index, 1, 0,
467 pcm->private_data = dreamcastcard;
515 struct snd_card_aica *dreamcastcard;
516 dreamcastcard = kcontrol->private_data;
517 if (unlikely(!dreamcastcard->channel))
519 ucontrol->value.integer.value[0] = dreamcastcard->channel->vol;
526 struct snd_card_aica *dreamcastcard;
528 dreamcastcard = kcontrol->private_data;
529 if (unlikely(!dreamcastcard->channel))
534 if (unlikely(dreamcastcard->channel->vol == vol))
536 dreamcastcard->channel->vol = ucontrol->value.integer.value[0];
537 dreamcastcard->master_volume = ucontrol->value.integer.value[0];
539 dreamcastcard->channel, sizeof(struct aica_channel));
578 *dreamcastcard)
582 (dreamcastcard->card,
583 snd_ctl_new1(&snd_aica_pcmvolume_control, dreamcastcard));
587 (dreamcastcard->card,
588 snd_ctl_new1(&snd_aica_pcmswitch_control, dreamcastcard));
596 struct snd_card_aica *dreamcastcard;
597 dreamcastcard = platform_get_drvdata(devptr);
598 if (unlikely(!dreamcastcard))
600 snd_card_free(dreamcastcard->card);
601 kfree(dreamcastcard);
609 struct snd_card_aica *dreamcastcard;
610 dreamcastcard = kmalloc(sizeof(struct snd_card_aica), GFP_KERNEL);
611 if (unlikely(!dreamcastcard))
614 &dreamcastcard->card);
616 kfree(dreamcastcard);
619 strcpy(dreamcastcard->card->driver, "snd_aica");
620 strcpy(dreamcastcard->card->shortname, SND_AICA_DRIVER);
621 strcpy(dreamcastcard->card->longname,
624 INIT_WORK(&(dreamcastcard->spu_dma_work), run_spu_dma);
626 err = snd_aicapcmchip(dreamcastcard, 0);
629 snd_card_set_dev(dreamcastcard->card, &devptr->dev);
630 dreamcastcard->timer.data = 0;
631 dreamcastcard->channel = NULL;
633 err = add_aicamixer_controls(dreamcastcard);
637 err = snd_card_register(dreamcastcard->card);
640 platform_set_drvdata(devptr, dreamcastcard);
648 snd_card_free(dreamcastcard->card);
649 kfree(dreamcastcard);