Skip to content

Conversation

@bardliao
Copy link
Collaborator

Currently, function topology is only used by the SoundWire machines. Extend the support to the I2S machines.

Each function topology has its own NHLT blob sections. And we need to
look for the matching blob from all the NHLT blobs. Also, move the error
log to where the blob can't be found from all the NHLT blobs.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
The existing code supports get_function_tplg_files callback for
SoundWire machine driver only. Some common sections can be used for
other machines.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
…et_tplg_files

The Intel SOF SDW machine drive also supports I2S interface. Add related
supports for the sof_sdw_get_tplg_files() callback.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
… I2S machines

Add sof_i2s_get_tplg_files() callback for Intel SOF I2S machines.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Use sof_i2s_get_tplg_files() for SOF es83x6 machines.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Copy link
Collaborator

@ujfalusi ujfalusi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only checked the first patch

}

dev_err(dev, "%s: No match for SSP%d in NHLT table\n", __func__,
dev_dbg(dev, "%s: No match for SSP%d in NHLT table\n", __func__,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have this as separate patch?

we are also going to look for DMIC blobs in several nhlt, so change those prints as well?

struct snd_ipc4_nhlt *nhlt;

ipc4_data->nhlt = intel_nhlt_init(sdev->dev);
nhlt->nhlt = intel_nhlt_init(sdev->dev);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm, does this works? nhlt is a pointer, which has not been initialized. nhlt->nhlt dereferencing a random memory and stores a pointer in random place, corrupting something?

ipc4_data->nhlt = intel_nhlt_init(sdev->dev);
nhlt->nhlt = intel_nhlt_init(sdev->dev);

list_add(&nhlt->list, &ipc4_data->nhlt_list);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

struct snd_ipc4_nhlt {
struct list_head list;
void *nhlt;
size_t nhlt_size;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nhlt_size is not used

size_t nhlt_size;
};


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra line break

channel_count, sample_rate,
dir, dev_type);
if (cfg)
break;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

goto out; and remove the cfg check after the loop?

struct snd_ipc4_nhlt *tplg_nhlt;

/* Get the nhlt from topology manifest*/
tplg_nhlt = kzalloc(sizeof(*tplg_nhlt), GFP_KERNEL);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what is missing in hda-dai.c!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but you need devm_kzalloc() to leak memory..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants