Skip to content
Draft
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
6 changes: 6 additions & 0 deletions sound/soc/sof/ipc4-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -1380,6 +1380,9 @@ static int sof_ipc4_update_hw_params(struct snd_sof_dev *sdev, struct snd_pcm_hw
case SOF_IPC4_TYPE_UNSIGNED_INTEGER:
snd_fmt = SNDRV_PCM_FORMAT_U8;
break;
case SOF_IPC4_TYPE_SIGNED_INTEGER:
snd_fmt = SNDRV_PCM_FORMAT_S8;
break;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Fixes: c04c2e8 ("ASoC: SOF: ipc4-topology: Add support for 8-bit formats")

Copy link
Author

Choose a reason for hiding this comment

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

Is this kind of patch considered as fix? It's a new format supported. Though I missed this from an internal requirement that wasn't very specific.

I can add that line yes, if it's right for this case.

default:
dev_err(sdev->dev, "Unsupported PCM 8-bit IPC4 type %d\n", type);
return -EINVAL;
Expand Down Expand Up @@ -1521,6 +1524,7 @@ static int sof_ipc4_get_valid_bits(struct snd_sof_dev *sdev, struct snd_pcm_hw_p
{
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_U8:
case SNDRV_PCM_FORMAT_S8:
case SNDRV_PCM_FORMAT_MU_LAW:
case SNDRV_PCM_FORMAT_A_LAW:
return 8;
Expand All @@ -1547,6 +1551,8 @@ static int sof_ipc4_get_sample_type(struct snd_sof_dev *sdev, struct snd_pcm_hw_
return SOF_IPC4_TYPE_MU_LAW;
case SNDRV_PCM_FORMAT_U8:
return SOF_IPC4_TYPE_UNSIGNED_INTEGER;
case SNDRV_PCM_FORMAT_S8:
return SOF_IPC4_TYPE_SIGNED_INTEGER;
case SNDRV_PCM_FORMAT_S16_LE:
case SNDRV_PCM_FORMAT_S24_LE:
case SNDRV_PCM_FORMAT_S32_LE:
Expand Down
Loading