Angel Pons | 118a9c7 | 2020-04-02 23:48:34 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 2 | |
Furquan Shaikh | 76cedd2 | 2020-05-02 10:24:23 -0700 | [diff] [blame] | 3 | #include <acpi/acpi.h> |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 4 | #include <cbfs.h> |
| 5 | #include <commonlib/endian.h> |
| 6 | #include <console/console.h> |
| 7 | #include <nhlt.h> |
| 8 | #include <stdlib.h> |
| 9 | #include <string.h> |
| 10 | |
| 11 | #define NHLT_RID 1 |
| 12 | #define NHLT_SSID 1 |
| 13 | #define WAVEFORMAT_TAG 0xfffe |
Aaron Durbin | ed0f6d7 | 2016-06-28 14:59:21 -0500 | [diff] [blame] | 14 | #define DEFAULT_VIRTUAL_BUS_ID 0 |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 15 | |
| 16 | static const struct sub_format pcm_subformat = { |
| 17 | .data1 = 0x00000001, |
| 18 | .data2 = 0x0000, |
| 19 | .data3 = 0x0010, |
| 20 | .data4 = { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 }, |
| 21 | }; |
| 22 | |
| 23 | struct nhlt *nhlt_init(void) |
| 24 | { |
| 25 | struct nhlt *nhlt; |
| 26 | |
| 27 | nhlt = malloc(sizeof(*nhlt)); |
| 28 | |
| 29 | if (nhlt == NULL) |
| 30 | return NULL; |
| 31 | |
| 32 | memset(nhlt, 0, sizeof(*nhlt)); |
Harsha Priya | 5c31511 | 2018-05-03 18:07:40 -0700 | [diff] [blame] | 33 | nhlt->subsystem_id = NHLT_SSID; |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 34 | |
| 35 | return nhlt; |
| 36 | } |
| 37 | |
| 38 | struct nhlt_endpoint *nhlt_add_endpoint(struct nhlt *nhlt, int link_type, |
| 39 | int device_type, int dir, |
| 40 | uint16_t vid, uint16_t did) |
| 41 | { |
| 42 | struct nhlt_endpoint *endp; |
| 43 | |
| 44 | if (link_type < NHLT_LINK_HDA || link_type >= NHLT_MAX_LINK_TYPES) |
| 45 | return NULL; |
| 46 | |
| 47 | if (nhlt->num_endpoints >= MAX_ENDPOINTS) |
| 48 | return NULL; |
| 49 | |
| 50 | endp = &nhlt->endpoints[nhlt->num_endpoints]; |
| 51 | |
| 52 | endp->link_type = link_type; |
| 53 | endp->instance_id = nhlt->current_instance_id[link_type]; |
| 54 | endp->vendor_id = vid; |
| 55 | endp->device_id = did; |
| 56 | endp->revision_id = NHLT_RID; |
Harsha Priya | 5c31511 | 2018-05-03 18:07:40 -0700 | [diff] [blame] | 57 | endp->subsystem_id = nhlt->subsystem_id; |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 58 | endp->device_type = device_type; |
| 59 | endp->direction = dir; |
Aaron Durbin | ed0f6d7 | 2016-06-28 14:59:21 -0500 | [diff] [blame] | 60 | endp->virtual_bus_id = DEFAULT_VIRTUAL_BUS_ID; |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 61 | |
| 62 | nhlt->num_endpoints++; |
| 63 | |
| 64 | return endp; |
| 65 | } |
| 66 | |
| 67 | static int append_specific_config(struct nhlt_specific_config *spec_cfg, |
| 68 | const void *config, size_t config_sz) |
| 69 | { |
| 70 | size_t new_sz; |
| 71 | void *new_cfg; |
| 72 | |
| 73 | if (config == NULL || config_sz == 0) |
| 74 | return 0; |
| 75 | |
| 76 | new_sz = spec_cfg->size + config_sz; |
| 77 | |
| 78 | new_cfg = malloc(new_sz); |
| 79 | |
| 80 | if (new_cfg == NULL) |
| 81 | return -1; |
| 82 | |
| 83 | /* Append new config. */ |
| 84 | memcpy(new_cfg, spec_cfg->capabilities, spec_cfg->size); |
| 85 | memcpy(new_cfg + spec_cfg->size, config, config_sz); |
| 86 | |
| 87 | free(spec_cfg->capabilities); |
| 88 | |
| 89 | /* Update with new config data. */ |
| 90 | spec_cfg->size = new_sz; |
| 91 | spec_cfg->capabilities = new_cfg; |
| 92 | |
| 93 | return 0; |
| 94 | } |
| 95 | |
| 96 | int nhlt_endpoint_append_config(struct nhlt_endpoint *endp, const void *config, |
| 97 | size_t config_sz) |
| 98 | { |
| 99 | return append_specific_config(&endp->config, config, config_sz); |
| 100 | } |
| 101 | |
| 102 | struct nhlt_format *nhlt_add_format(struct nhlt_endpoint *endp, |
| 103 | int num_channels, |
| 104 | int sample_freq_khz, |
| 105 | int container_bits_per_sample, |
| 106 | int valid_bits_per_sample, |
| 107 | uint32_t speaker_mask) |
| 108 | { |
| 109 | struct nhlt_format *fmt; |
| 110 | struct nhlt_waveform *wave; |
| 111 | |
| 112 | if (endp->num_formats >= MAX_FORMATS) |
| 113 | return NULL; |
| 114 | |
| 115 | fmt = &endp->formats[endp->num_formats]; |
| 116 | wave = &fmt->waveform; |
| 117 | |
| 118 | wave->tag = WAVEFORMAT_TAG; |
| 119 | wave->num_channels = num_channels; |
| 120 | wave->samples_per_second = sample_freq_khz * KHz; |
| 121 | wave->bits_per_sample = container_bits_per_sample; |
| 122 | wave->extra_size = sizeof(wave->valid_bits_per_sample); |
| 123 | wave->extra_size += sizeof(wave->channel_mask); |
| 124 | wave->extra_size += sizeof(wave->sub_format); |
| 125 | wave->valid_bits_per_sample = valid_bits_per_sample; |
| 126 | wave->channel_mask = speaker_mask; |
| 127 | memcpy(&wave->sub_format, &pcm_subformat, sizeof(wave->sub_format)); |
| 128 | |
Martin Roth | 0949e73 | 2021-10-01 14:28:22 -0600 | [diff] [blame] | 129 | /* Calculate the derived fields. */ |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 130 | wave->block_align = wave->num_channels * wave->bits_per_sample / 8; |
| 131 | wave->bytes_per_second = wave->block_align * wave->samples_per_second; |
| 132 | |
| 133 | endp->num_formats++; |
| 134 | |
| 135 | return fmt; |
| 136 | } |
| 137 | |
| 138 | int nhlt_format_append_config(struct nhlt_format *fmt, const void *config, |
| 139 | size_t config_sz) |
| 140 | { |
| 141 | return append_specific_config(&fmt->config, config, config_sz); |
| 142 | } |
| 143 | |
| 144 | int nhlt_endpoint_add_formats(struct nhlt_endpoint *endp, |
| 145 | const struct nhlt_format_config *formats, |
| 146 | size_t num_formats) |
| 147 | { |
| 148 | size_t i; |
| 149 | |
| 150 | for (i = 0; i < num_formats; i++) { |
| 151 | struct nhlt_format *fmt; |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 152 | void *settings_data; |
Julius Werner | 77639e4 | 2021-02-05 16:51:25 -0800 | [diff] [blame] | 153 | size_t size; |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 154 | const struct nhlt_format_config *cfg = &formats[i]; |
| 155 | |
| 156 | fmt = nhlt_add_format(endp, cfg->num_channels, |
| 157 | cfg->sample_freq_khz, |
| 158 | cfg->container_bits_per_sample, |
| 159 | cfg->valid_bits_per_sample, |
| 160 | cfg->speaker_mask); |
| 161 | |
| 162 | if (fmt == NULL) |
| 163 | return -1; |
| 164 | |
| 165 | if (cfg->settings_file == NULL) |
| 166 | continue; |
| 167 | |
| 168 | /* Find the settings file in CBFS and place it in format. */ |
Julius Werner | 77639e4 | 2021-02-05 16:51:25 -0800 | [diff] [blame] | 169 | settings_data = cbfs_map(cfg->settings_file, &size); |
| 170 | if (!settings_data) |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 171 | return -1; |
| 172 | |
Julius Werner | 77639e4 | 2021-02-05 16:51:25 -0800 | [diff] [blame] | 173 | if (nhlt_format_append_config(fmt, settings_data, size)) { |
| 174 | cbfs_unmap(settings_data); |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 175 | return -1; |
| 176 | } |
| 177 | |
Julius Werner | 77639e4 | 2021-02-05 16:51:25 -0800 | [diff] [blame] | 178 | cbfs_unmap(settings_data); |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 179 | } |
| 180 | |
| 181 | return 0; |
| 182 | } |
| 183 | |
| 184 | void nhlt_next_instance(struct nhlt *nhlt, int link_type) |
| 185 | { |
| 186 | if (link_type < NHLT_LINK_HDA || link_type >= NHLT_MAX_LINK_TYPES) |
| 187 | return; |
| 188 | |
| 189 | nhlt->current_instance_id[link_type]++; |
| 190 | } |
| 191 | |
| 192 | static size_t calc_specific_config_size(struct nhlt_specific_config *cfg) |
| 193 | { |
| 194 | return sizeof(cfg->size) + cfg->size; |
| 195 | } |
| 196 | |
| 197 | static size_t calc_format_size(struct nhlt_format *fmt) |
| 198 | { |
| 199 | size_t sz = 0; |
| 200 | |
| 201 | /* Wave format first. */ |
| 202 | sz += sizeof(fmt->waveform.tag); |
| 203 | sz += sizeof(fmt->waveform.num_channels); |
| 204 | sz += sizeof(fmt->waveform.samples_per_second); |
| 205 | sz += sizeof(fmt->waveform.bytes_per_second); |
| 206 | sz += sizeof(fmt->waveform.block_align); |
| 207 | sz += sizeof(fmt->waveform.bits_per_sample); |
| 208 | sz += sizeof(fmt->waveform.extra_size); |
| 209 | sz += sizeof(fmt->waveform.valid_bits_per_sample); |
| 210 | sz += sizeof(fmt->waveform.channel_mask); |
| 211 | sz += sizeof(fmt->waveform.sub_format); |
| 212 | |
| 213 | sz += calc_specific_config_size(&fmt->config); |
| 214 | |
| 215 | return sz; |
| 216 | } |
| 217 | |
| 218 | static size_t calc_endpoint_size(struct nhlt_endpoint *endp) |
| 219 | { |
| 220 | int i; |
| 221 | size_t sz = 0; |
| 222 | |
| 223 | sz += sizeof(endp->length) + sizeof(endp->link_type); |
| 224 | sz += sizeof(endp->instance_id) + sizeof(endp->vendor_id); |
| 225 | sz += sizeof(endp->device_id) + sizeof(endp->revision_id); |
| 226 | sz += sizeof(endp->subsystem_id) + sizeof(endp->device_type); |
| 227 | sz += sizeof(endp->direction) + sizeof(endp->virtual_bus_id); |
| 228 | sz += calc_specific_config_size(&endp->config); |
| 229 | sz += sizeof(endp->num_formats); |
| 230 | |
| 231 | for (i = 0; i < endp->num_formats; i++) |
| 232 | sz += calc_format_size(&endp->formats[i]); |
| 233 | |
| 234 | /* Adjust endpoint length to reflect current configuration. */ |
| 235 | endp->length = sz; |
| 236 | |
| 237 | return sz; |
| 238 | } |
| 239 | |
| 240 | static size_t calc_endpoints_size(struct nhlt *nhlt) |
| 241 | { |
| 242 | int i; |
| 243 | size_t sz = 0; |
| 244 | |
| 245 | for (i = 0; i < nhlt->num_endpoints; i++) |
| 246 | sz += calc_endpoint_size(&nhlt->endpoints[i]); |
| 247 | |
| 248 | return sz; |
| 249 | } |
| 250 | |
| 251 | static size_t calc_size(struct nhlt *nhlt) |
| 252 | { |
| 253 | return sizeof(nhlt->num_endpoints) + calc_endpoints_size(nhlt); |
| 254 | } |
| 255 | |
| 256 | size_t nhlt_current_size(struct nhlt *nhlt) |
| 257 | { |
| 258 | return calc_size(nhlt) + sizeof(acpi_header_t); |
| 259 | } |
| 260 | |
| 261 | static void nhlt_free_resources(struct nhlt *nhlt) |
| 262 | { |
| 263 | int i; |
| 264 | int j; |
| 265 | |
| 266 | /* Free all specific configs. */ |
| 267 | for (i = 0; i < nhlt->num_endpoints; i++) { |
| 268 | struct nhlt_endpoint *endp = &nhlt->endpoints[i]; |
| 269 | |
| 270 | free(endp->config.capabilities); |
| 271 | for (j = 0; j < endp->num_formats; j++) { |
| 272 | struct nhlt_format *fmt = &endp->formats[j]; |
| 273 | |
| 274 | free(fmt->config.capabilities); |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | /* Free nhlt object proper. */ |
| 279 | free(nhlt); |
| 280 | } |
| 281 | |
| 282 | struct cursor { |
| 283 | uint8_t *buf; |
| 284 | }; |
| 285 | |
| 286 | static void ser8(struct cursor *cur, uint8_t val) |
| 287 | { |
| 288 | write_le8(cur->buf, val); |
| 289 | cur->buf += sizeof(val); |
| 290 | } |
| 291 | |
| 292 | static void ser16(struct cursor *cur, uint16_t val) |
| 293 | { |
| 294 | write_le16(cur->buf, val); |
| 295 | cur->buf += sizeof(val); |
| 296 | } |
| 297 | |
| 298 | static void ser32(struct cursor *cur, uint32_t val) |
| 299 | { |
| 300 | write_le32(cur->buf, val); |
| 301 | cur->buf += sizeof(val); |
| 302 | } |
| 303 | |
| 304 | static void serblob(struct cursor *cur, void *from, size_t sz) |
| 305 | { |
| 306 | memcpy(cur->buf, from, sz); |
| 307 | cur->buf += sz; |
| 308 | } |
| 309 | |
| 310 | static void serialize_specific_config(struct nhlt_specific_config *cfg, |
| 311 | struct cursor *cur) |
| 312 | { |
| 313 | ser32(cur, cfg->size); |
| 314 | serblob(cur, cfg->capabilities, cfg->size); |
| 315 | } |
| 316 | |
| 317 | static void serialize_waveform(struct nhlt_waveform *wave, struct cursor *cur) |
| 318 | { |
| 319 | ser16(cur, wave->tag); |
| 320 | ser16(cur, wave->num_channels); |
| 321 | ser32(cur, wave->samples_per_second); |
| 322 | ser32(cur, wave->bytes_per_second); |
| 323 | ser16(cur, wave->block_align); |
| 324 | ser16(cur, wave->bits_per_sample); |
| 325 | ser16(cur, wave->extra_size); |
| 326 | ser16(cur, wave->valid_bits_per_sample); |
| 327 | ser32(cur, wave->channel_mask); |
| 328 | ser32(cur, wave->sub_format.data1); |
| 329 | ser16(cur, wave->sub_format.data2); |
| 330 | ser16(cur, wave->sub_format.data3); |
| 331 | serblob(cur, wave->sub_format.data4, sizeof(wave->sub_format.data4)); |
| 332 | } |
| 333 | |
| 334 | static void serialize_format(struct nhlt_format *fmt, struct cursor *cur) |
| 335 | { |
| 336 | serialize_waveform(&fmt->waveform, cur); |
| 337 | serialize_specific_config(&fmt->config, cur); |
| 338 | } |
| 339 | |
| 340 | static void serialize_endpoint(struct nhlt_endpoint *endp, struct cursor *cur) |
| 341 | { |
| 342 | int i; |
| 343 | |
| 344 | ser32(cur, endp->length); |
| 345 | ser8(cur, endp->link_type); |
| 346 | ser8(cur, endp->instance_id); |
| 347 | ser16(cur, endp->vendor_id); |
| 348 | ser16(cur, endp->device_id); |
| 349 | ser16(cur, endp->revision_id); |
| 350 | ser32(cur, endp->subsystem_id); |
| 351 | ser8(cur, endp->device_type); |
| 352 | ser8(cur, endp->direction); |
| 353 | ser8(cur, endp->virtual_bus_id); |
| 354 | serialize_specific_config(&endp->config, cur); |
| 355 | ser8(cur, endp->num_formats); |
| 356 | |
| 357 | for (i = 0; i < endp->num_formats; i++) |
| 358 | serialize_format(&endp->formats[i], cur); |
| 359 | } |
| 360 | |
| 361 | static void nhlt_serialize_endpoints(struct nhlt *nhlt, struct cursor *cur) |
| 362 | { |
| 363 | int i; |
| 364 | |
| 365 | ser8(cur, nhlt->num_endpoints); |
| 366 | |
| 367 | for (i = 0; i < nhlt->num_endpoints; i++) |
| 368 | serialize_endpoint(&nhlt->endpoints[i], cur); |
| 369 | } |
| 370 | |
| 371 | uintptr_t nhlt_serialize(struct nhlt *nhlt, uintptr_t acpi_addr) |
| 372 | { |
Aaron Durbin | b4afe3c | 2016-11-29 23:14:25 -0600 | [diff] [blame] | 373 | return nhlt_serialize_oem_overrides(nhlt, acpi_addr, NULL, NULL, 0); |
Fang, Yang A | 16ff859 | 2016-01-28 16:52:33 -0800 | [diff] [blame] | 374 | } |
| 375 | |
| 376 | uintptr_t nhlt_serialize_oem_overrides(struct nhlt *nhlt, |
Aaron Durbin | b4afe3c | 2016-11-29 23:14:25 -0600 | [diff] [blame] | 377 | uintptr_t acpi_addr, const char *oem_id, const char *oem_table_id, |
| 378 | uint32_t oem_revision) |
Fang, Yang A | 16ff859 | 2016-01-28 16:52:33 -0800 | [diff] [blame] | 379 | { |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 380 | struct cursor cur; |
| 381 | acpi_header_t *header; |
| 382 | size_t sz; |
Fang, Yang A | 16ff859 | 2016-01-28 16:52:33 -0800 | [diff] [blame] | 383 | size_t oem_id_len; |
| 384 | size_t oem_table_id_len; |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 385 | |
| 386 | printk(BIOS_DEBUG, "ACPI: * NHLT\n"); |
| 387 | |
| 388 | sz = nhlt_current_size(nhlt); |
| 389 | |
| 390 | /* Create header */ |
| 391 | header = (void *)acpi_addr; |
| 392 | memset(header, 0, sizeof(acpi_header_t)); |
| 393 | memcpy(header->signature, "NHLT", 4); |
| 394 | write_le32(&header->length, sz); |
Marc Jones | 7a5f0a9 | 2018-08-22 19:36:40 -0600 | [diff] [blame] | 395 | write_le8(&header->revision, get_acpi_table_revision(NHLT)); |
Fang, Yang A | 16ff859 | 2016-01-28 16:52:33 -0800 | [diff] [blame] | 396 | |
| 397 | if (oem_id == NULL) |
| 398 | oem_id = OEM_ID; |
| 399 | |
| 400 | if (oem_table_id == NULL) |
| 401 | oem_table_id = ACPI_TABLE_CREATOR; |
| 402 | |
| 403 | oem_id_len = MIN(strlen(oem_id), 6); |
| 404 | oem_table_id_len = MIN(strlen(oem_table_id), 8); |
| 405 | |
| 406 | memcpy(header->oem_id, oem_id, oem_id_len); |
| 407 | memcpy(header->oem_table_id, oem_table_id, oem_table_id_len); |
Aaron Durbin | b4afe3c | 2016-11-29 23:14:25 -0600 | [diff] [blame] | 408 | write_le32(&header->oem_revision, oem_revision); |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 409 | memcpy(header->asl_compiler_id, ASLC, 4); |
| 410 | |
| 411 | cur.buf = (void *)(acpi_addr + sizeof(acpi_header_t)); |
| 412 | nhlt_serialize_endpoints(nhlt, &cur); |
| 413 | |
| 414 | write_le8(&header->checksum, acpi_checksum((void *)header, sz)); |
| 415 | |
| 416 | nhlt_free_resources(nhlt); |
| 417 | |
| 418 | acpi_addr += sz; |
| 419 | acpi_addr = ALIGN_UP(acpi_addr, 16); |
| 420 | |
| 421 | return acpi_addr; |
| 422 | } |
Aaron Durbin | ed0f6d7 | 2016-06-28 14:59:21 -0500 | [diff] [blame] | 423 | |
| 424 | static int _nhlt_add_single_endpoint(struct nhlt *nhlt, int virtual_bus_id, |
| 425 | const struct nhlt_endp_descriptor *epd) |
| 426 | { |
| 427 | struct nhlt_endpoint *endp; |
| 428 | |
| 429 | endp = nhlt_add_endpoint(nhlt, epd->link, epd->device, epd->direction, |
| 430 | epd->vid, epd->did); |
| 431 | |
| 432 | if (endp == NULL) |
| 433 | return -1; |
| 434 | |
| 435 | endp->virtual_bus_id = virtual_bus_id; |
| 436 | |
| 437 | if (nhlt_endpoint_append_config(endp, epd->cfg, epd->cfg_size)) |
| 438 | return -1; |
| 439 | |
| 440 | if (nhlt_endpoint_add_formats(endp, epd->formats, epd->num_formats)) |
| 441 | return -1; |
| 442 | |
| 443 | return 0; |
| 444 | } |
| 445 | |
| 446 | static int _nhlt_add_endpoints(struct nhlt *nhlt, int virtual_bus_id, |
| 447 | const struct nhlt_endp_descriptor *epds, |
| 448 | size_t num_epds) |
| 449 | { |
| 450 | size_t i; |
| 451 | |
| 452 | for (i = 0; i < num_epds; i++) |
| 453 | if (_nhlt_add_single_endpoint(nhlt, virtual_bus_id, &epds[i])) |
| 454 | return -1; |
| 455 | |
| 456 | return 0; |
| 457 | } |
| 458 | |
| 459 | int nhlt_add_endpoints(struct nhlt *nhlt, |
| 460 | const struct nhlt_endp_descriptor *epds, |
| 461 | size_t num_epds) |
| 462 | { |
| 463 | int ret; |
| 464 | ret = _nhlt_add_endpoints(nhlt, DEFAULT_VIRTUAL_BUS_ID, epds, num_epds); |
| 465 | return ret; |
| 466 | } |
| 467 | |
| 468 | int nhlt_add_ssp_endpoints(struct nhlt *nhlt, int virtual_bus_id, |
| 469 | const struct nhlt_endp_descriptor *epds, size_t num_epds) |
| 470 | { |
| 471 | int ret; |
| 472 | |
| 473 | ret = _nhlt_add_endpoints(nhlt, virtual_bus_id, epds, num_epds); |
| 474 | |
| 475 | if (!ret) |
| 476 | nhlt_next_instance(nhlt, NHLT_LINK_SSP); |
| 477 | |
| 478 | return ret; |
| 479 | } |