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