FW interface for HDA DAI parameters was extended with information on sampling rate and channel count in version 3.16. Align kernel header with the FW change. This change is backwards compatible. Old firmware will ignore the values.
Unified · Split
| @@ -88,6 +88,8 @@ struct sof_ipc_dai_ssp_params { · 87 unmodified lines | ||
| 88 | 88 | struct sof_ipc_dai_hda_params { |
| 89 | 89 | struct sof_ipc_hdr hdr; |
| 90 | 90 | uint32_t link_dma_ch; |
| 91 | + uint32_t rate; | |
| 92 | + uint32_t channels; | |
| 91 | 93 | } __packed; |
| 92 | 94 | |
| 93 | 95 | /* ALH Configuration Request - SOF_IPC_DAI_ALH_CONFIG */ |
| @@ -26,7 +26,7 @@ · 25 unmodified lines | ||
| 26 | 26 | |
| 27 | 27 | /* SOF ABI version major, minor and patch numbers */ |
| 28 | 28 | #define SOF_ABI_MAJOR 3 |
| 29 | −#define SOF_ABI_MINOR 15 | |
| 29 | +#define SOF_ABI_MINOR 16 | |
| 30 | 30 | #define SOF_ABI_PATCH 0 |
| 31 | 31 | |
| 32 | 32 | /* SOF ABI version number. Format within 32bit word is MMmmmppp */ |
| @@ -130,4 +130,8 @@ · 129 unmodified lines | ||
| 130 | 130 | #define SOF_TKN_INTEL_ALH_RATE 1400 |
| 131 | 131 | #define SOF_TKN_INTEL_ALH_CH 1401 |
| 132 | 132 | |
| 133 | +/* HDA */ | |
| 134 | +#define SOF_TKN_INTEL_HDA_RATE 1500 | |
| 135 | +#define SOF_TKN_INTEL_HDA_CH 1501 | |
| 136 | + | |
| 133 | 137 | #endif |
| @@ -753,6 +753,12 @@ static const struct sof_topology_token dmic_pdm_tokens[] = { · 752 unmodified lines | ||
| 753 | 753 | |
| 754 | 754 | /* HDA */ |
| 755 | 755 | static const struct sof_topology_token hda_tokens[] = { |
| 756 | + {SOF_TKN_INTEL_HDA_RATE, | |
| 757 | + SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32, | |
| 758 | + offsetof(struct sof_ipc_dai_hda_params, rate), 0}, | |
| 759 | + {SOF_TKN_INTEL_HDA_CH, | |
| 760 | + SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32, | |
| 761 | + offsetof(struct sof_ipc_dai_hda_params, channels), 0}, | |
| 756 | 762 | }; |
| 757 | 763 | |
| 758 | 764 | /* Leds */ |
| @@ -3083,6 +3089,9 @@ static int sof_link_hda_load(struct snd_soc_component *scomp, int index, · 2324 unmodified lines | ||
| 3083 | 3089 | return ret; |
| 3084 | 3090 | } |
| 3085 | 3091 | |
| 3092 | + dev_dbg(scomp->dev, "HDA config rate %d channels %d\n", | |
| 3093 | + config->hda.rate, config->hda.channels); | |
| 3094 | + | |
| 3086 | 3095 | dai = snd_soc_find_dai(link->cpus); |
| 3087 | 3096 | if (!dai) { |
| 3088 | 3097 | dev_err(scomp->dev, "error: failed to find dai %s in %s", |