Lines Matching +full:dual +full:- +full:direction
1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
3 // This file is provided under a dual BSD/GPLv2 license. When using or
6 // Copyright(c) 2019-2021 Intel Corporation
17 #include "../sof-priv.h"
18 #include "../sof-client-probes.h"
19 #include "../sof-client.h"
25 return cstream->runtime->private_data; in hda_compr_get_stream()
35 hext_stream = hda_dsp_stream_get(sdev, cstream->direction, 0); in hda_probes_compr_startup()
37 return -EBUSY; in hda_probes_compr_startup()
39 hdac_stream(hext_stream)->curr_pos = 0; in hda_probes_compr_startup()
40 hdac_stream(hext_stream)->cstream = cstream; in hda_probes_compr_startup()
41 cstream->runtime->private_data = hext_stream; in hda_probes_compr_startup()
43 *stream_id = hdac_stream(hext_stream)->stream_tag; in hda_probes_compr_startup()
56 ret = hda_dsp_stream_put(sdev, cstream->direction, in hda_probes_compr_shutdown()
57 hdac_stream(hext_stream)->stream_tag); in hda_probes_compr_shutdown()
59 dev_dbg(sdev->dev, "stream put failed: %d\n", ret); in hda_probes_compr_shutdown()
63 hdac_stream(hext_stream)->cstream = NULL; in hda_probes_compr_shutdown()
64 cstream->runtime->private_data = NULL; in hda_probes_compr_shutdown()
81 dmab = cstream->runtime->dma_buffer_p; in hda_probes_compr_set_params()
87 rate = hda_dsp_get_mult_div(sdev, params->codec.sample_rate); in hda_probes_compr_set_params()
89 hstream->format_val = rate | bits | (params->codec.ch_out - 1); in hda_probes_compr_set_params()
90 hstream->bufsize = cstream->runtime->buffer_size; in hda_probes_compr_set_params()
91 hstream->period_bytes = cstream->runtime->fragment_size; in hda_probes_compr_set_params()
92 hstream->no_period_wakeup = 0; in hda_probes_compr_set_params()
96 dev_err(sdev->dev, "error: hdac prepare failed: %d\n", ret); in hda_probes_compr_set_params()
121 pstream = &dai->driver->capture; in hda_probes_compr_pointer()
122 tstamp->copied_total = hdac_stream(hext_stream)->curr_pos; in hda_probes_compr_pointer()
123 tstamp->sampling_rate = snd_pcm_rate_bit_to_rate(pstream->rates); in hda_probes_compr_pointer()
139 return sof_client_dev_register(sdev, "hda-probes", 0, &hda_probes_ops, in hda_probes_register()
146 sof_client_dev_unregister(sdev, "hda-probes", 0); in hda_probes_unregister()