ASoC: Intel: Skylake: Fix the NHLT rate size
[deliverable/linux.git] / sound / soc / intel / skylake / skl-nhlt.h
CommitLineData
473eb87a
JK
1/*
2 * skl-nhlt.h - Intel HDA Platform NHLT header
3 *
4 * Copyright (C) 2015 Intel Corp
5 * Author: Sanjiv Kumar <sanjiv.kumar@intel.com>
6 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 *
19 */
20#ifndef __SKL_NHLT_H__
21#define __SKL_NHLT_H__
22
23struct acpi_desc_header {
24 u32 signature;
25 u32 length;
26 u8 revision;
27 u8 checksum;
28 u8 oem_id[6];
29 u64 oem_table_id;
30 u32 oem_revision;
31 u32 creator_id;
32 u32 creator_revision;
33} __packed;
34
35struct wav_fmt {
36 u16 fmt_tag;
37 u16 channels;
38 u32 samples_per_sec;
39 u32 avg_bytes_per_sec;
40 u16 block_align;
41 u16 bits_per_sample;
42 u16 cb_size;
43} __packed;
44
45struct wav_fmt_ext {
46 struct wav_fmt fmt;
47 union samples {
48 u16 valid_bits_per_sample;
49 u16 samples_per_block;
50 u16 reserved;
51 } sample;
52 u32 channel_mask;
53 u8 sub_fmt[16];
54} __packed;
55
56enum nhlt_link_type {
57 NHLT_LINK_HDA = 0,
58 NHLT_LINK_DSP = 1,
59 NHLT_LINK_DMIC = 2,
60 NHLT_LINK_SSP = 3,
61 NHLT_LINK_INVALID
62};
63
64enum nhlt_device_type {
65 NHLT_DEVICE_BT = 0,
66 NHLT_DEVICE_DMIC = 1,
67 NHLT_DEVICE_I2S = 4,
68 NHLT_DEVICE_INVALID
69};
70
71struct nhlt_specific_cfg {
72 u32 size;
73 u8 caps[0];
74} __packed;
75
76struct nhlt_fmt_cfg {
77 struct wav_fmt_ext fmt_ext;
78 struct nhlt_specific_cfg config;
79} __packed;
80
81struct nhlt_fmt {
82 u8 fmt_count;
83 struct nhlt_fmt_cfg fmt_config[0];
84} __packed;
85
86struct nhlt_endpoint {
87 u32 length;
88 u8 linktype;
89 u8 instance_id;
90 u16 vendor_id;
91 u16 device_id;
92 u16 revision_id;
93 u32 subsystem_id;
94 u8 device_type;
95 u8 direction;
96 u8 virtual_bus_id;
97 struct nhlt_specific_cfg config;
98} __packed;
99
100struct nhlt_acpi_table {
101 struct acpi_desc_header header;
102 u8 endpoint_count;
103 struct nhlt_endpoint desc[0];
104} __packed;
105
106struct nhlt_resource_desc {
107 u32 extra;
108 u16 flags;
109 u64 addr_spc_gra;
110 u64 min_addr;
111 u64 max_addr;
112 u64 addr_trans_offset;
113 u64 length;
114} __packed;
115
116#endif
This page took 0.027248 seconds and 5 git commands to generate.