Lines Matching refs:card_ctx
36 #define for_each_pipe(card_ctx, pipe) \ argument
37 for ((pipe) = 0; (pipe) < (card_ctx)->num_pipes; (pipe)++)
38 #define for_each_port(card_ctx, port) \ argument
39 for ((port) = 0; (port) < (card_ctx)->num_ports; (port)++)
206 static u32 had_read_register_raw(struct snd_intelhad_card *card_ctx, in had_read_register_raw() argument
209 return ioread32(card_ctx->mmio_start + had_config_offset(pipe) + reg); in had_read_register_raw()
212 static void had_write_register_raw(struct snd_intelhad_card *card_ctx, in had_write_register_raw() argument
215 iowrite32(val, card_ctx->mmio_start + had_config_offset(pipe) + reg); in had_write_register_raw()
223 *val = had_read_register_raw(ctx->card_ctx, ctx->pipe, reg); in had_read_register()
229 had_write_register_raw(ctx->card_ctx, ctx->pipe, reg, val); in had_write_register()
1512 struct snd_intelhad_card *card_ctx = dev_id; in display_pipe_interrupt_handler() local
1516 for_each_pipe(card_ctx, pipe) { in display_pipe_interrupt_handler()
1518 audio_stat[pipe] = had_read_register_raw(card_ctx, pipe, in display_pipe_interrupt_handler()
1523 had_write_register_raw(card_ctx, pipe, in display_pipe_interrupt_handler()
1527 for_each_port(card_ctx, port) { in display_pipe_interrupt_handler()
1528 struct snd_intelhad *ctx = &card_ctx->pcm_ctx[port]; in display_pipe_interrupt_handler()
1548 struct snd_intelhad_card *card_ctx = platform_get_drvdata(pdev); in notify_audio_lpe() local
1551 ctx = &card_ctx->pcm_ctx[single_port ? 0 : port]; in notify_audio_lpe()
1626 err = snd_jack_new(ctx->card_ctx->card, hdmi_str, in had_create_jack()
1641 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); in hdmi_lpe_audio_suspend() local
1643 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot); in hdmi_lpe_audio_suspend()
1650 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); in hdmi_lpe_audio_resume() local
1654 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D0); in hdmi_lpe_audio_resume()
1662 struct snd_intelhad_card *card_ctx = card->private_data; in hdmi_lpe_audio_free() local
1663 struct intel_hdmi_lpe_audio_pdata *pdata = card_ctx->dev->platform_data; in hdmi_lpe_audio_free()
1670 for_each_port(card_ctx, port) { in hdmi_lpe_audio_free()
1671 struct snd_intelhad *ctx = &card_ctx->pcm_ctx[port]; in hdmi_lpe_audio_free()
1676 if (card_ctx->mmio_start) in hdmi_lpe_audio_free()
1677 iounmap(card_ctx->mmio_start); in hdmi_lpe_audio_free()
1678 if (card_ctx->irq >= 0) in hdmi_lpe_audio_free()
1679 free_irq(card_ctx->irq, card_ctx); in hdmi_lpe_audio_free()
1691 struct snd_intelhad_card *card_ctx; in hdmi_lpe_audio_probe() local
1718 THIS_MODULE, sizeof(*card_ctx), &card); in hdmi_lpe_audio_probe()
1722 card_ctx = card->private_data; in hdmi_lpe_audio_probe()
1723 card_ctx->dev = &pdev->dev; in hdmi_lpe_audio_probe()
1724 card_ctx->card = card; in hdmi_lpe_audio_probe()
1729 card_ctx->irq = -1; in hdmi_lpe_audio_probe()
1733 platform_set_drvdata(pdev, card_ctx); in hdmi_lpe_audio_probe()
1735 card_ctx->num_pipes = pdata->num_pipes; in hdmi_lpe_audio_probe()
1736 card_ctx->num_ports = single_port ? 1 : pdata->num_ports; in hdmi_lpe_audio_probe()
1738 for_each_port(card_ctx, port) { in hdmi_lpe_audio_probe()
1739 ctx = &card_ctx->pcm_ctx[port]; in hdmi_lpe_audio_probe()
1740 ctx->card_ctx = card_ctx; in hdmi_lpe_audio_probe()
1741 ctx->dev = card_ctx->dev; in hdmi_lpe_audio_probe()
1754 card_ctx->mmio_start = ioremap(res_mmio->start, in hdmi_lpe_audio_probe()
1756 if (!card_ctx->mmio_start) { in hdmi_lpe_audio_probe()
1764 pdev->name, card_ctx); in hdmi_lpe_audio_probe()
1770 card_ctx->irq = irq; in hdmi_lpe_audio_probe()
1778 card_ctx->num_pipes = pdata->num_pipes; in hdmi_lpe_audio_probe()
1779 card_ctx->num_ports = single_port ? 1 : pdata->num_ports; in hdmi_lpe_audio_probe()
1781 for_each_port(card_ctx, port) { in hdmi_lpe_audio_probe()
1784 ctx = &card_ctx->pcm_ctx[port]; in hdmi_lpe_audio_probe()
1843 for_each_port(card_ctx, port) { in hdmi_lpe_audio_probe()
1844 struct snd_intelhad *ctx = &card_ctx->pcm_ctx[port]; in hdmi_lpe_audio_probe()
1863 struct snd_intelhad_card *card_ctx = platform_get_drvdata(pdev); in hdmi_lpe_audio_remove() local
1865 snd_card_free(card_ctx->card); in hdmi_lpe_audio_remove()