History

ASoC: SOF: topology: Get HDA rate and channels from topology

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.

Bard Liao committed 6 years ago

Commit 18aaab61 parent 15bf1834 files · +16 −1Browse files

Unified · Split

4 files
  1. include/sound/sof/dai-intel.h +2 −0
  2. include/uapi/sound/sof/abi.h +1 −1
  3. include/uapi/sound/sof/tokens.h +4 −0
  4. sound/soc/sof/topology.c +9 −0
include/sound/sof/dai-intel.h+2−0
@@ -88,6 +88,8 @@ struct sof_ipc_dai_ssp_params { · 87 unmodified lines
88struct sof_ipc_dai_hda_params {88struct sof_ipc_dai_hda_params {
89 struct sof_ipc_hdr hdr;89 struct sof_ipc_hdr hdr;
90 uint32_t link_dma_ch;90 uint32_t link_dma_ch;
91 uint32_t rate;
92 uint32_t channels;
91} __packed;93} __packed;
92 94
93/* ALH Configuration Request - SOF_IPC_DAI_ALH_CONFIG */95/* ALH Configuration Request - SOF_IPC_DAI_ALH_CONFIG */
include/uapi/sound/sof/abi.h+1−1
@@ -26,7 +26,7 @@ · 25 unmodified lines
26 26
27/* SOF ABI version major, minor and patch numbers */27/* SOF ABI version major, minor and patch numbers */
28#define SOF_ABI_MAJOR 328#define SOF_ABI_MAJOR 3
29#define SOF_ABI_MINOR 1529#define SOF_ABI_MINOR 16
30#define SOF_ABI_PATCH 030#define SOF_ABI_PATCH 0
31 31
32/* SOF ABI version number. Format within 32bit word is MMmmmppp */32/* SOF ABI version number. Format within 32bit word is MMmmmppp */
include/uapi/sound/sof/tokens.h+4−0
@@ -130,4 +130,8 @@ · 129 unmodified lines
130#define SOF_TKN_INTEL_ALH_RATE 1400130#define SOF_TKN_INTEL_ALH_RATE 1400
131#define SOF_TKN_INTEL_ALH_CH 1401131#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#endif137#endif
sound/soc/sof/topology.c+9−0
@@ -753,6 +753,12 @@ static const struct sof_topology_token dmic_pdm_tokens[] = { · 752 unmodified lines
753 753
754/* HDA */754/* HDA */
755static const struct sof_topology_token hda_tokens[] = {755static 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/* Leds */764/* Leds */
@@ -3083,6 +3089,9 @@ static int sof_link_hda_load(struct snd_soc_component *scomp, int index, · 2324 unmodified lines
3083 return ret;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 dai = snd_soc_find_dai(link->cpus);3095 dai = snd_soc_find_dai(link->cpus);
3087 if (!dai) {3096 if (!dai) {
3088 dev_err(scomp->dev, "error: failed to find dai %s in %s",3097 dev_err(scomp->dev, "error: failed to find dai %s in %s",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t