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
8888 struct sof_ipc_dai_hda_params {
8989 struct sof_ipc_hdr hdr;
9090 uint32_t link_dma_ch;
91+ uint32_t rate;
92+ uint32_t channels;
9193 } __packed;
9294
9395 /* ALH Configuration Request - SOF_IPC_DAI_ALH_CONFIG */
include/uapi/sound/sof/abi.h+1−1
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626
2727 /* SOF ABI version major, minor and patch numbers */
2828 #define SOF_ABI_MAJOR 3
29−#define SOF_ABI_MINOR 15
29+#define SOF_ABI_MINOR 16
3030 #define SOF_ABI_PATCH 0
3131
3232 /* 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
130130 #define SOF_TKN_INTEL_ALH_RATE 1400
131131 #define SOF_TKN_INTEL_ALH_CH 1401
132132
133+/* HDA */
134+#define SOF_TKN_INTEL_HDA_RATE 1500
135+#define SOF_TKN_INTEL_HDA_CH 1501
136+
133137 #endif
sound/soc/sof/topology.c+9−0
@@ -753,6 +753,12 @@ static const struct sof_topology_token dmic_pdm_tokens[] = { · 752 unmodified lines
753753
754754 /* HDA */
755755 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},
756762 };
757763
758764 /* Leds */
@@ -3083,6 +3089,9 @@ static int sof_link_hda_load(struct snd_soc_component *scomp, int index, · 2324 unmodified lines
30833089 return ret;
30843090 }
30853091
3092+ dev_dbg(scomp->dev, "HDA config rate %d channels %d\n",
3093+ config->hda.rate, config->hda.channels);
3094+
30863095 dai = snd_soc_find_dai(link->cpus);
30873096 if (!dai) {
30883097 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