mirror of https://github.com/thesofproject/sof.git
audio: chain_dma: use devicetree definitions directly
Stop using the SOF platform layer and directly pull the hardware properties from devicetree. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
parent
6c0efc6d98
commit
1d4b5caccd
|
@ -30,8 +30,11 @@
|
||||||
#include <ipc/header.h>
|
#include <ipc/header.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DT_NUM_HDA_IN DT_PROP(DT_INST(0, intel_adsp_hda_link_in), dma_channels)
|
||||||
|
#define DT_NUM_HDA_OUT DT_PROP(DT_INST(0, intel_adsp_hda_link_out), dma_channels)
|
||||||
|
|
||||||
static const struct comp_driver comp_chain_dma;
|
static const struct comp_driver comp_chain_dma;
|
||||||
static const uint32_t max_chain_number = DAI_NUM_HDA_OUT + DAI_NUM_HDA_IN;
|
static const uint32_t max_chain_number = DT_NUM_HDA_OUT + DT_NUM_HDA_IN;
|
||||||
|
|
||||||
LOG_MODULE_REGISTER(chain_dma, CONFIG_SOF_LOG_LEVEL);
|
LOG_MODULE_REGISTER(chain_dma, CONFIG_SOF_LOG_LEVEL);
|
||||||
|
|
||||||
|
@ -405,10 +408,10 @@ static int get_connector_node_id(uint32_t dma_id, bool host_type,
|
||||||
{
|
{
|
||||||
uint8_t type = host_type ? ipc4_hda_host_output_class : ipc4_hda_link_output_class;
|
uint8_t type = host_type ? ipc4_hda_host_output_class : ipc4_hda_link_output_class;
|
||||||
|
|
||||||
if (dma_id >= DAI_NUM_HDA_OUT) {
|
if (dma_id >= DT_NUM_HDA_OUT) {
|
||||||
type = host_type ? ipc4_hda_host_input_class : ipc4_hda_link_input_class;
|
type = host_type ? ipc4_hda_host_input_class : ipc4_hda_link_input_class;
|
||||||
dma_id -= DAI_NUM_HDA_OUT;
|
dma_id -= DT_NUM_HDA_OUT;
|
||||||
if (dma_id >= DAI_NUM_HDA_IN)
|
if (dma_id >= DT_NUM_HDA_IN)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
connector_node_id->dw = 0;
|
connector_node_id->dw = 0;
|
||||||
|
|
Loading…
Reference in New Issue