soc/intel_adsp: Require definitions for cavs_hda.h

Rather than defining them in the header, require a set of defines
be provided to cavs_hda.h as part of the expected input to the API.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
This commit is contained in:
Tom Burdick 2022-03-01 15:22:53 -06:00 committed by Anas Nashif
commit 602ef3fb0e
6 changed files with 39 additions and 17 deletions

View file

@ -6,7 +6,6 @@
#include <kernel.h>
#include <ztest.h>
#include <cavs_ipc.h>
#include <cavs_hda.h>
#include <drivers/dma.h>
#include "tests.h"
@ -17,6 +16,11 @@
static __aligned(128) uint8_t dma_buf[DMA_BUF_SIZE];
#define HDA_HOST_IN_BASE DT_PROP_BY_IDX(DT_NODELABEL(hda_host_in), reg, 0)
#define HDA_HOST_OUT_BASE DT_PROP_BY_IDX(DT_NODELABEL(hda_host_out), reg, 0)
#define HDA_STREAM_COUNT DT_PROP(DT_NODELABEL(hda_host_out), dma_channels)
#define HDA_REGBLOCK_SIZE DT_PROP_BY_IDX(DT_NODELABEL(hda_host_out), reg, 1)
#include <cavs_hda.h>
static volatile int msg_cnt;
static volatile int msg_res;

View file

@ -6,9 +6,15 @@
#include <kernel.h>
#include <ztest.h>
#include <cavs_ipc.h>
#include <cavs_hda.h>
#include <devicetree.h>
#include "tests.h"
#define HDA_HOST_IN_BASE DT_PROP_BY_IDX(DT_NODELABEL(hda_host_in), reg, 0)
#define HDA_HOST_OUT_BASE DT_PROP_BY_IDX(DT_NODELABEL(hda_host_out), reg, 0)
#define HDA_STREAM_COUNT DT_PROP(DT_NODELABEL(hda_host_out), dma_channels)
#define HDA_REGBLOCK_SIZE DT_PROP_BY_IDX(DT_NODELABEL(hda_host_out), reg, 1)
#include <cavs_hda.h>
#define IPC_TIMEOUT K_MSEC(500)
#define STREAM_ID 3U
#define HDA_BUF_SIZE 256