Lines Matching defs:card_ctx

40 #define for_each_pipe(card_ctx, pipe) \
41 for ((pipe) = 0; (pipe) < (card_ctx)->num_pipes; (pipe)++)
42 #define for_each_port(card_ctx, port) \
43 for ((port) = 0; (port) < (card_ctx)->num_ports; (port)++)
205 static u32 had_read_register_raw(struct snd_intelhad_card *card_ctx,
208 return ioread32(card_ctx->mmio_start + had_config_offset(pipe) + reg);
211 static void had_write_register_raw(struct snd_intelhad_card *card_ctx,
214 iowrite32(val, card_ctx->mmio_start + had_config_offset(pipe) + reg);
222 *val = had_read_register_raw(ctx->card_ctx, ctx->pipe, reg);
228 had_write_register_raw(ctx->card_ctx, ctx->pipe, reg, val);
1467 struct snd_intelhad_card *card_ctx = dev_id;
1471 for_each_pipe(card_ctx, pipe) {
1473 audio_stat[pipe] = had_read_register_raw(card_ctx, pipe,
1478 had_write_register_raw(card_ctx, pipe,
1482 for_each_port(card_ctx, port) {
1483 struct snd_intelhad *ctx = &card_ctx->pcm_ctx[port];
1503 struct snd_intelhad_card *card_ctx = platform_get_drvdata(pdev);
1506 ctx = &card_ctx->pcm_ctx[single_port ? 0 : port];
1584 err = snd_jack_new(ctx->card_ctx->card, hdmi_str,
1599 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1601 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot);
1608 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1612 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D0);
1620 struct snd_intelhad_card *card_ctx = card->private_data;
1621 struct intel_hdmi_lpe_audio_pdata *pdata = card_ctx->dev->platform_data;
1628 for_each_port(card_ctx, port) {
1629 struct snd_intelhad *ctx = &card_ctx->pcm_ctx[port];
1644 struct snd_intelhad_card *card_ctx;
1671 THIS_MODULE, sizeof(*card_ctx), &card);
1675 card_ctx = card->private_data;
1676 card_ctx->dev = &pdev->dev;
1677 card_ctx->card = card;
1682 card_ctx->irq = -1;
1686 platform_set_drvdata(pdev, card_ctx);
1688 card_ctx->num_pipes = pdata->num_pipes;
1689 card_ctx->num_ports = single_port ? 1 : pdata->num_ports;
1691 for_each_port(card_ctx, port) {
1692 ctx = &card_ctx->pcm_ctx[port];
1693 ctx->card_ctx = card_ctx;
1694 ctx->dev = card_ctx->dev;
1707 card_ctx->mmio_start =
1710 if (!card_ctx->mmio_start) {
1717 0, pdev->name, card_ctx);
1723 card_ctx->irq = irq;
1732 card_ctx->num_pipes = pdata->num_pipes;
1733 card_ctx->num_ports = single_port ? 1 : pdata->num_ports;
1735 for_each_port(card_ctx, port) {
1738 ctx = &card_ctx->pcm_ctx[port];
1798 for_each_port(card_ctx, port) {
1799 struct snd_intelhad *ctx = &card_ctx->pcm_ctx[port];