Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/audio/asrc/asrc_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int asrc_dai_configure_timestamp(struct comp_data *cd)
if (!cd->dai_dev)
return -ENODEV;

struct processing_module *mod = comp_get_drvdata(cd->dai_dev);
struct processing_module *mod = comp_mod(cd->dai_dev);
const struct module_interface *const ops = mod->dev->drv->adapter_ops;

return ops->endpoint_ops->dai_ts_config(cd->dai_dev);
Expand All @@ -38,7 +38,7 @@ int asrc_dai_start_timestamp(struct comp_data *cd)
if (!cd->dai_dev)
return -ENODEV;

struct processing_module *mod = comp_get_drvdata(cd->dai_dev);
struct processing_module *mod = comp_mod(cd->dai_dev);
const struct module_interface *const ops = mod->dev->drv->adapter_ops;

return ops->endpoint_ops->dai_ts_start(cd->dai_dev);
Expand All @@ -49,7 +49,7 @@ int asrc_dai_stop_timestamp(struct comp_data *cd)
if (!cd->dai_dev)
return -ENODEV;

struct processing_module *mod = comp_get_drvdata(cd->dai_dev);
struct processing_module *mod = comp_mod(cd->dai_dev);
const struct module_interface *const ops = mod->dev->drv->adapter_ops;

return ops->endpoint_ops->dai_ts_stop(cd->dai_dev);
Expand All @@ -64,7 +64,7 @@ int asrc_dai_get_timestamp(struct comp_data *cd, struct timestamp_data *tsd)
if (!cd->dai_dev)
return -ENODEV;

struct processing_module *mod = comp_get_drvdata(cd->dai_dev);
struct processing_module *mod = comp_mod(cd->dai_dev);
const struct module_interface *const ops = mod->dev->drv->adapter_ops;

return ops->endpoint_ops->dai_ts_get(cd->dai_dev, tsd);
Expand Down
20 changes: 10 additions & 10 deletions src/audio/copier/copier.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ static int copier_reset(struct processing_module *mod)

static int copier_comp_trigger(struct comp_dev *dev, int cmd)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
struct sof_ipc_stream_posn posn;
struct comp_dev *dai_copier;
Expand Down Expand Up @@ -660,7 +660,7 @@ static int copier_set_sink_fmt(struct comp_dev *dev, const void *data,
int max_data_size)
{
const struct ipc4_copier_config_set_sink_format *sink_fmt = data;
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
struct list_item *sink_list;
struct comp_buffer *sink;
Expand Down Expand Up @@ -711,7 +711,7 @@ static int copier_set_sink_fmt(struct comp_dev *dev, const void *data,

static int set_attenuation(struct comp_dev *dev, uint32_t data_offset, const char *data)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
uint32_t attenuation;
enum sof_ipc_frame valid_fmt, frame_fmt;
Expand Down Expand Up @@ -860,7 +860,7 @@ static int copier_get_configuration(struct processing_module *mod,

static uint64_t copier_get_processed_data(struct comp_dev *dev, uint32_t stream_no, bool input)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
uint64_t ret = 0;
bool source;
Expand Down Expand Up @@ -905,7 +905,7 @@ static uint64_t copier_get_processed_data(struct comp_dev *dev, uint32_t stream_

static int copier_position(struct comp_dev *dev, struct sof_ipc_stream_posn *posn)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
int ret = 0;

Expand Down Expand Up @@ -933,7 +933,7 @@ static int copier_position(struct comp_dev *dev, struct sof_ipc_stream_posn *pos

static int copier_dai_ts_config_op(struct comp_dev *dev)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
struct dai_data *dd = cd->dd[0];

Expand All @@ -942,7 +942,7 @@ static int copier_dai_ts_config_op(struct comp_dev *dev)

static int copier_dai_ts_start_op(struct comp_dev *dev)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
struct dai_data *dd = cd->dd[0];

Expand All @@ -957,7 +957,7 @@ static int copier_dai_ts_get_op(struct comp_dev *dev, struct dai_ts_data *tsd)
static int copier_dai_ts_get_op(struct comp_dev *dev, struct timestamp_data *tsd)
#endif
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
struct dai_data *dd = cd->dd[0];

Expand All @@ -968,7 +968,7 @@ static int copier_dai_ts_get_op(struct comp_dev *dev, struct timestamp_data *tsd

static int copier_dai_ts_stop_op(struct comp_dev *dev)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
struct dai_data *dd = cd->dd[0];

Expand All @@ -980,7 +980,7 @@ static int copier_dai_ts_stop_op(struct comp_dev *dev)
static int copier_get_hw_params(struct comp_dev *dev, struct sof_ipc_stream_params *params,
int dir)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
struct dai_data *dd = cd->dd[0];

Expand Down
8 changes: 4 additions & 4 deletions src/audio/copier/copier_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static int copier_set_alh_multi_gtw_channel_map(struct comp_dev *dev,
const struct ipc4_copier_module_cfg *copier_cfg,
int index)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
const struct sof_alh_configuration_blob *alh_blob;
uint8_t chan_bitmask;
Expand Down Expand Up @@ -71,7 +71,7 @@ static int copier_alh_assign_dai_index(struct comp_dev *dev,
int *dai_index,
int *dai_count)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
const struct sof_alh_configuration_blob *alh_blob = gtw_cfg_data;
uint8_t *dma_config;
Expand Down Expand Up @@ -162,7 +162,7 @@ static int copier_dai_init(struct comp_dev *dev,
enum ipc4_gateway_type type,
int index, int dai_count)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
struct dai_data *dd;
int ret;
Expand Down Expand Up @@ -230,7 +230,7 @@ int copier_dai_create(struct comp_dev *dev, struct copier_data *cd,
const struct ipc4_copier_module_cfg *copier,
struct pipeline *pipeline)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct comp_ipc_config *config = &dev->ipc_config;
int dai_index[IPC4_ALH_MAX_NUMBER_OF_GTW];
union ipc4_connector_node_id node_id;
Expand Down
6 changes: 3 additions & 3 deletions src/audio/copier/copier_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void delete_from_fpi_sync_group(struct host_data *hd)
/* Playback only */
static int init_pipeline_reg(struct comp_dev *dev)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
struct ipc4_pipeline_registers pipe_reg;
uint32_t gateway_id;
Expand Down Expand Up @@ -126,7 +126,7 @@ int copier_host_create(struct comp_dev *dev, struct copier_data *cd,
const struct ipc4_copier_module_cfg *copier_cfg,
struct pipeline *pipeline)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct comp_ipc_config *config = &dev->ipc_config;
struct ipc_config_host ipc_host;
struct host_data *hd;
Expand Down Expand Up @@ -244,7 +244,7 @@ void copier_host_free(struct copier_data *cd)
*/
void copier_host_dma_cb(struct comp_dev *dev, size_t bytes)
{
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct copier_data *cd = module_get_private_data(mod);
int ret, frames;

Expand Down
2 changes: 1 addition & 1 deletion src/audio/crossover/crossover.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static int crossover_assign_sinks(struct processing_module *mod,
unsigned int sink_id, state;

sink = container_of(sink_list, struct comp_buffer, source_list);
sink_id = crossover_get_sink_id(cd, sink->pipeline_id, j);
sink_id = crossover_get_sink_id(cd, buffer_pipeline_id(sink), j);
state = sink->sink->state;
if (state != dev->state) {
j++;
Expand Down
2 changes: 1 addition & 1 deletion src/audio/crossover/crossover_ipc3.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ int crossover_check_sink_assign(struct processing_module *mod,
unsigned int pipeline_id;

sink = container_of(sink_list, struct comp_buffer, source_list);
pipeline_id = sink->pipeline_id;
pipeline_id = buffer_pipeline_id(sink);

i = crossover_get_stream_index(mod, config, pipeline_id);
if (i < 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/audio/eq_fir/eq_fir.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int eq_fir_init_coef(struct comp_dev *dev, struct sof_eq_fir_config *conf
/* Called from validate(), we shall find nch and assign it accordingly,
* as the parameter is not valid
*/
struct processing_module *mod = comp_get_drvdata(dev);
struct processing_module *mod = comp_mod(dev);
struct comp_data *cd = module_get_private_data(mod);

nch = cd->nch;
Expand Down
2 changes: 1 addition & 1 deletion src/audio/mixin_mixout/mixin_mixout.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static int mixin_process(struct processing_module *mod,
continue;
}

mixout_mod = comp_get_drvdata(mixout);
mixout_mod = comp_mod(mixout);
active_mixouts[i] = mixout_mod;
mixout_sink = mixout_mod->sinks[0];

Expand Down
3 changes: 2 additions & 1 deletion src/audio/module_adapter/module/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ int module_load_config(struct comp_dev *dev, const void *cfg, size_t size)
{
int ret;
struct module_config *dst;
struct processing_module *mod = comp_get_drvdata(dev);
/* loadable module must use module adapter */
struct processing_module *mod = comp_mod(dev);
struct module_data *md = &mod->priv;

comp_dbg(dev, "module_load_config() start");
Expand Down
20 changes: 0 additions & 20 deletions src/audio/module_adapter/module/modules.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,23 +245,3 @@ const struct module_interface processing_module_adapter_interface = {
.reset = modules_reset,
.free = modules_free,
};

/**
* \brief Create a module adapter component.
* \param[in] drv - component driver pointer.
* \param[in] config - component ipc descriptor pointer.
* \param[in] spec - pointer to module configuration data
*
* \return: a pointer to newly created module adapter component on success. NULL on error.
*
* \note: For dynamically loaded module the spec size is not known by base FW, since this is
* loaded module specific information. Therefore configuration size is required here.
* New module details are discovered during its loading, therefore comp_driver initialisation
* happens at this point.
*/
struct comp_dev *modules_shim_new(const struct comp_driver *drv,
const struct comp_ipc_config *config,
const void *spec)
{
return module_adapter_new(drv, config, spec);
}
Loading