Lines Matching refs:ad
50 struct hdmi_audio_data *ad = dev_get_drvdata(dev); in hdmi_dai_abort() local
52 mutex_lock(&ad->current_stream_lock); in hdmi_dai_abort()
53 if (ad->current_stream && ad->current_stream->runtime && in hdmi_dai_abort()
54 snd_pcm_running(ad->current_stream)) { in hdmi_dai_abort()
56 snd_pcm_stream_lock_irq(ad->current_stream); in hdmi_dai_abort()
57 snd_pcm_stop(ad->current_stream, SNDRV_PCM_STATE_DISCONNECTED); in hdmi_dai_abort()
58 snd_pcm_stream_unlock_irq(ad->current_stream); in hdmi_dai_abort()
60 mutex_unlock(&ad->current_stream_lock); in hdmi_dai_abort()
66 struct hdmi_audio_data *ad = card_drvdata_substream(substream); in hdmi_dai_startup() local
87 snd_soc_dai_set_dma_data(dai, substream, &ad->dma_data); in hdmi_dai_startup()
89 mutex_lock(&ad->current_stream_lock); in hdmi_dai_startup()
90 ad->current_stream = substream; in hdmi_dai_startup()
91 mutex_unlock(&ad->current_stream_lock); in hdmi_dai_startup()
93 ret = ad->ops->audio_startup(ad->dssdev, hdmi_dai_abort); in hdmi_dai_startup()
96 mutex_lock(&ad->current_stream_lock); in hdmi_dai_startup()
97 ad->current_stream = NULL; in hdmi_dai_startup()
98 mutex_unlock(&ad->current_stream_lock); in hdmi_dai_startup()
108 struct hdmi_audio_data *ad = card_drvdata_substream(substream); in hdmi_dai_hw_params() local
109 struct snd_aes_iec958 *iec = &ad->iec; in hdmi_dai_hw_params()
110 struct snd_cea_861_aud_if *cea = &ad->cea; in hdmi_dai_hw_params()
112 WARN_ON(ad->current_stream != substream); in hdmi_dai_hw_params()
116 ad->dma_data.maxburst = 16; in hdmi_dai_hw_params()
119 ad->dma_data.maxburst = 32; in hdmi_dai_hw_params()
126 ad->dss_audio.iec = iec; in hdmi_dai_hw_params()
127 ad->dss_audio.cea = cea; in hdmi_dai_hw_params()
227 return ad->ops->audio_config(ad->dssdev, &ad->dss_audio); in hdmi_dai_hw_params()
233 struct hdmi_audio_data *ad = card_drvdata_substream(substream); in hdmi_dai_trigger() local
236 WARN_ON(ad->current_stream != substream); in hdmi_dai_trigger()
242 err = ad->ops->audio_start(ad->dssdev); in hdmi_dai_trigger()
247 ad->ops->audio_stop(ad->dssdev); in hdmi_dai_trigger()
258 struct hdmi_audio_data *ad = card_drvdata_substream(substream); in hdmi_dai_shutdown() local
260 WARN_ON(ad->current_stream != substream); in hdmi_dai_shutdown()
262 ad->ops->audio_shutdown(ad->dssdev); in hdmi_dai_shutdown()
264 mutex_lock(&ad->current_stream_lock); in hdmi_dai_shutdown()
265 ad->current_stream = NULL; in hdmi_dai_shutdown()
266 mutex_unlock(&ad->current_stream_lock); in hdmi_dai_shutdown()
313 struct hdmi_audio_data *ad; in omap_hdmi_audio_probe() local
324 ad = devm_kzalloc(dev, sizeof(*ad), GFP_KERNEL); in omap_hdmi_audio_probe()
325 if (!ad) in omap_hdmi_audio_probe()
327 ad->dssdev = ha->dev; in omap_hdmi_audio_probe()
328 ad->ops = ha->ops; in omap_hdmi_audio_probe()
329 ad->dma_data.addr = ha->audio_dma_addr; in omap_hdmi_audio_probe()
330 ad->dma_data.filter_data = "audio_tx"; in omap_hdmi_audio_probe()
331 ad->dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in omap_hdmi_audio_probe()
332 mutex_init(&ad->current_stream_lock); in omap_hdmi_audio_probe()
344 ret = devm_snd_soc_register_component(ad->dssdev, &omap_hdmi_component, in omap_hdmi_audio_probe()
349 ret = sdma_pcm_platform_register(ad->dssdev, "audio_tx", NULL); in omap_hdmi_audio_probe()
358 "HDMI %s", dev_name(ad->dssdev)); in omap_hdmi_audio_probe()
378 card->dai_link->cpus->dai_name = dev_name(ad->dssdev); in omap_hdmi_audio_probe()
388 ad->card = card; in omap_hdmi_audio_probe()
389 snd_soc_card_set_drvdata(card, ad); in omap_hdmi_audio_probe()
391 dev_set_drvdata(dev, ad); in omap_hdmi_audio_probe()
398 struct hdmi_audio_data *ad = platform_get_drvdata(pdev); in omap_hdmi_audio_remove() local
400 snd_soc_unregister_card(ad->card); in omap_hdmi_audio_remove()