Lines Matching refs:card_ctx

38 #define for_each_pipe(card_ctx, pipe) \
39 for ((pipe) = 0; (pipe) < (card_ctx)->num_pipes; (pipe)++)
40 #define for_each_port(card_ctx, port) \
41 for ((port) = 0; (port) < (card_ctx)->num_ports; (port)++)
208 static u32 had_read_register_raw(struct snd_intelhad_card *card_ctx,
211 return ioread32(card_ctx->mmio_start + had_config_offset(pipe) + reg);
214 static void had_write_register_raw(struct snd_intelhad_card *card_ctx,
217 iowrite32(val, card_ctx->mmio_start + had_config_offset(pipe) + reg);
225 *val = had_read_register_raw(ctx->card_ctx, ctx->pipe, reg);
231 had_write_register_raw(ctx->card_ctx, ctx->pipe, reg, val);
1488 struct snd_intelhad_card *card_ctx = dev_id;
1492 for_each_pipe(card_ctx, pipe) {
1494 audio_stat[pipe] = had_read_register_raw(card_ctx, pipe,
1499 had_write_register_raw(card_ctx, pipe,
1503 for_each_port(card_ctx, port) {
1504 struct snd_intelhad *ctx = &card_ctx->pcm_ctx[port];
1524 struct snd_intelhad_card *card_ctx = platform_get_drvdata(pdev);
1527 ctx = &card_ctx->pcm_ctx[single_port ? 0 : port];
1606 err = snd_jack_new(ctx->card_ctx->card, hdmi_str,
1621 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1623 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot);
1630 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1634 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D0);
1642 struct snd_intelhad_card *card_ctx = card->private_data;
1643 struct intel_hdmi_lpe_audio_pdata *pdata = card_ctx->dev->platform_data;
1650 for_each_port(card_ctx, port) {
1651 struct snd_intelhad *ctx = &card_ctx->pcm_ctx[port];
1666 struct snd_intelhad_card *card_ctx;
1693 THIS_MODULE, sizeof(*card_ctx), &card);
1697 card_ctx = card->private_data;
1698 card_ctx->dev = &pdev->dev;
1699 card_ctx->card = card;
1704 card_ctx->irq = -1;
1708 platform_set_drvdata(pdev, card_ctx);
1710 card_ctx->num_pipes = pdata->num_pipes;
1711 card_ctx->num_ports = single_port ? 1 : pdata->num_ports;
1713 for_each_port(card_ctx, port) {
1714 ctx = &card_ctx->pcm_ctx[port];
1715 ctx->card_ctx = card_ctx;
1716 ctx->dev = card_ctx->dev;
1729 card_ctx->mmio_start =
1732 if (!card_ctx->mmio_start) {
1739 0, pdev->name, card_ctx);
1745 card_ctx->irq = irq;
1754 card_ctx->num_pipes = pdata->num_pipes;
1755 card_ctx->num_ports = single_port ? 1 : pdata->num_ports;
1757 for_each_port(card_ctx, port) {
1760 ctx = &card_ctx->pcm_ctx[port];
1820 for_each_port(card_ctx, port) {
1821 struct snd_intelhad *ctx = &card_ctx->pcm_ctx[port];