Searched refs:dreamcastcard (Results 1 - 1 of 1) sorted by relevance
/linux-4.1.27/sound/sh/ |
H A D | aica.c | 238 struct snd_card_aica *dreamcastcard; aica_dma_transfer() local 242 dreamcastcard = substream->pcm->private_data; aica_dma_transfer() 243 period_offset = dreamcastcard->clicks; aica_dma_transfer() 267 static void startup_aica(struct snd_card_aica *dreamcastcard) startup_aica() argument 270 dreamcastcard->channel, sizeof(struct aica_channel)); startup_aica() 278 struct snd_card_aica *dreamcastcard; run_spu_dma() local 279 dreamcastcard = run_spu_dma() 281 runtime = dreamcastcard->substream->runtime; run_spu_dma() 282 if (unlikely(dreamcastcard->dma_check == 0)) { run_spu_dma() 286 dreamcastcard->channel->flags |= 0x01; run_spu_dma() 288 dreamcastcard->substream); run_spu_dma() 289 startup_aica(dreamcastcard); run_spu_dma() 290 dreamcastcard->clicks = run_spu_dma() 296 dreamcastcard->substream); run_spu_dma() 297 snd_pcm_period_elapsed(dreamcastcard->substream); run_spu_dma() 298 dreamcastcard->clicks++; run_spu_dma() 299 if (unlikely(dreamcastcard->clicks >= AICA_PERIOD_NUMBER)) run_spu_dma() 300 dreamcastcard->clicks %= AICA_PERIOD_NUMBER; run_spu_dma() 301 mod_timer(&dreamcastcard->timer, jiffies + 1); run_spu_dma() 311 struct snd_card_aica *dreamcastcard; aica_period_elapsed() local 314 dreamcastcard = substream->pcm->private_data; aica_period_elapsed() 321 if (play_period == dreamcastcard->current_period) { aica_period_elapsed() 323 mod_timer(&(dreamcastcard->timer), jiffies + 1); aica_period_elapsed() 327 dreamcastcard->current_period = play_period; aica_period_elapsed() 328 if (unlikely(dreamcastcard->dma_check == 0)) aica_period_elapsed() 329 dreamcastcard->dma_check = 1; aica_period_elapsed() 330 queue_work(aica_queue, &(dreamcastcard->spu_dma_work)); aica_period_elapsed() 335 struct snd_card_aica *dreamcastcard; spu_begin_dma() local 338 dreamcastcard = substream->pcm->private_data; spu_begin_dma() 340 queue_work(aica_queue, &(dreamcastcard->spu_dma_work)); spu_begin_dma() 342 if (unlikely(dreamcastcard->timer.data)) { spu_begin_dma() 343 mod_timer(&dreamcastcard->timer, jiffies + 4); spu_begin_dma() 346 setup_timer(&dreamcastcard->timer, aica_period_elapsed, spu_begin_dma() 348 mod_timer(&dreamcastcard->timer, jiffies + 4); spu_begin_dma() 356 struct snd_card_aica *dreamcastcard; snd_aicapcm_pcm_open() local 359 dreamcastcard = substream->pcm->private_data; snd_aicapcm_pcm_open() 366 channel->vol = dreamcastcard->master_volume; snd_aicapcm_pcm_open() 370 dreamcastcard->channel = channel; snd_aicapcm_pcm_open() 374 dreamcastcard->clicks = 0; snd_aicapcm_pcm_open() 375 dreamcastcard->current_period = 0; snd_aicapcm_pcm_open() 376 dreamcastcard->dma_check = 0; snd_aicapcm_pcm_open() 383 struct snd_card_aica *dreamcastcard = substream->pcm->private_data; snd_aicapcm_pcm_close() local 385 if (dreamcastcard->timer.data) snd_aicapcm_pcm_close() 386 del_timer(&dreamcastcard->timer); snd_aicapcm_pcm_close() 387 kfree(dreamcastcard->channel); snd_aicapcm_pcm_close() 412 struct snd_card_aica *dreamcastcard = substream->pcm->private_data; snd_aicapcm_pcm_prepare() local 414 dreamcastcard->channel->sfmt = SM_16BIT; snd_aicapcm_pcm_prepare() 415 dreamcastcard->channel->freq = substream->runtime->rate; snd_aicapcm_pcm_prepare() 416 dreamcastcard->substream = substream; snd_aicapcm_pcm_prepare() 455 *dreamcastcard, int pcm_index) snd_aicapcmchip() 461 snd_pcm_new(dreamcastcard->card, "AICA PCM", pcm_index, 1, 0, snd_aicapcmchip() 465 pcm->private_data = dreamcastcard; snd_aicapcmchip() 513 struct snd_card_aica *dreamcastcard; aica_pcmvolume_get() local 514 dreamcastcard = kcontrol->private_data; aica_pcmvolume_get() 515 if (unlikely(!dreamcastcard->channel)) aica_pcmvolume_get() 517 ucontrol->value.integer.value[0] = dreamcastcard->channel->vol; aica_pcmvolume_get() 524 struct snd_card_aica *dreamcastcard; aica_pcmvolume_put() local 526 dreamcastcard = kcontrol->private_data; aica_pcmvolume_put() 527 if (unlikely(!dreamcastcard->channel)) aica_pcmvolume_put() 532 if (unlikely(dreamcastcard->channel->vol == vol)) aica_pcmvolume_put() 534 dreamcastcard->channel->vol = ucontrol->value.integer.value[0]; aica_pcmvolume_put() 535 dreamcastcard->master_volume = ucontrol->value.integer.value[0]; aica_pcmvolume_put() 537 dreamcastcard->channel, sizeof(struct aica_channel)); aica_pcmvolume_put() 575 static int add_aicamixer_controls(struct snd_card_aica *dreamcastcard) add_aicamixer_controls() argument 579 (dreamcastcard->card, add_aicamixer_controls() 580 snd_ctl_new1(&snd_aica_pcmvolume_control, dreamcastcard)); add_aicamixer_controls() 584 (dreamcastcard->card, add_aicamixer_controls() 585 snd_ctl_new1(&snd_aica_pcmswitch_control, dreamcastcard)); add_aicamixer_controls() 593 struct snd_card_aica *dreamcastcard; snd_aica_remove() local 594 dreamcastcard = platform_get_drvdata(devptr); snd_aica_remove() 595 if (unlikely(!dreamcastcard)) snd_aica_remove() 597 snd_card_free(dreamcastcard->card); snd_aica_remove() 598 kfree(dreamcastcard); snd_aica_remove() 605 struct snd_card_aica *dreamcastcard; snd_aica_probe() local 606 dreamcastcard = kmalloc(sizeof(struct snd_card_aica), GFP_KERNEL); snd_aica_probe() 607 if (unlikely(!dreamcastcard)) snd_aica_probe() 610 THIS_MODULE, 0, &dreamcastcard->card); snd_aica_probe() 612 kfree(dreamcastcard); snd_aica_probe() 615 strcpy(dreamcastcard->card->driver, "snd_aica"); snd_aica_probe() 616 strcpy(dreamcastcard->card->shortname, SND_AICA_DRIVER); snd_aica_probe() 617 strcpy(dreamcastcard->card->longname, snd_aica_probe() 620 INIT_WORK(&(dreamcastcard->spu_dma_work), run_spu_dma); snd_aica_probe() 622 err = snd_aicapcmchip(dreamcastcard, 0); snd_aica_probe() 625 dreamcastcard->timer.data = 0; snd_aica_probe() 626 dreamcastcard->channel = NULL; snd_aica_probe() 628 err = add_aicamixer_controls(dreamcastcard); snd_aica_probe() 632 err = snd_card_register(dreamcastcard->card); snd_aica_probe() 635 platform_set_drvdata(devptr, dreamcastcard); snd_aica_probe() 643 snd_card_free(dreamcastcard->card); snd_aica_probe() 644 kfree(dreamcastcard); snd_aica_probe() 454 snd_aicapcmchip(struct snd_card_aica *dreamcastcard, int pcm_index) snd_aicapcmchip() argument
|
Completed in 110 milliseconds