Lines Matching refs: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)++)
210 static u32 had_read_register_raw(struct snd_intelhad_card *card_ctx,
213 return ioread32(card_ctx->mmio_start + had_config_offset(pipe) + reg);
216 static void had_write_register_raw(struct snd_intelhad_card *card_ctx,
219 iowrite32(val, card_ctx->mmio_start + had_config_offset(pipe) + reg);
227 *val = had_read_register_raw(ctx->card_ctx, ctx->pipe, reg);
233 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];
1605 err = snd_jack_new(ctx->card_ctx->card, hdmi_str,
1620 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1622 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot);
1629 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1633 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D0);
1641 struct snd_intelhad_card *card_ctx = card->private_data;
1642 struct intel_hdmi_lpe_audio_pdata *pdata = card_ctx->dev->platform_data;
1649 for_each_port(card_ctx, port) {
1650 struct snd_intelhad *ctx = &card_ctx->pcm_ctx[port];
1665 struct snd_intelhad_card *card_ctx;
1692 THIS_MODULE, sizeof(*card_ctx), &card);
1696 card_ctx = card->private_data;
1697 card_ctx->dev = &pdev->dev;
1698 card_ctx->card = card;
1703 card_ctx->irq = -1;
1707 platform_set_drvdata(pdev, card_ctx);
1709 card_ctx->num_pipes = pdata->num_pipes;
1710 card_ctx->num_ports = single_port ? 1 : pdata->num_ports;
1712 for_each_port(card_ctx, port) {
1713 ctx = &card_ctx->pcm_ctx[port];
1714 ctx->card_ctx = card_ctx;
1715 ctx->dev = card_ctx->dev;
1728 card_ctx->mmio_start =
1731 if (!card_ctx->mmio_start) {
1738 0, pdev->name, card_ctx);
1744 card_ctx->irq = irq;
1753 card_ctx->num_pipes = pdata->num_pipes;
1754 card_ctx->num_ports = single_port ? 1 : pdata->num_ports;
1756 for_each_port(card_ctx, port) {
1759 ctx = &card_ctx->pcm_ctx[port];
1819 for_each_port(card_ctx, port) {
1820 struct snd_intelhad *ctx = &card_ctx->pcm_ctx[port];