1# 2# SSP DAI class definition. All attributes defined herein are namespaced 3# by alsatplg to "Object.Dai.SSP.N.attribute_name" 4# 5# Usage: SSP DAI objects can be instantiated as: 6# 7# Object.Dai.SSP."N" { 8# direction "duplex" # playback, capture or duplex 9# dai_name "NoCodec-0" 10# id 0 11# quirks "lbm_mode" 12# sample_bits 24 13# Object.hw_config."0" { 14# mclk_freq 24000000 15# bclk_freq 4800000 16# tdm_slot_width 25 17# } 18# Object.dai."playback" { 19# period_source_count 2 20# period_sink_count 0 21# } 22# Object.dai."capture" { 23# period_source_count 0 24# period_sink_count 2 25# } 26# } 27# 28# where N is the unique instance number for the SSP object within the same alsaconf node. 29 30# SSP port definition 31Class.Dai."SSP" { 32 33 # 34 # instance ID of SSP DAI object 35 # 36 DefineAttribute."instance" {} 37 38 # DAI Index 39 DefineAttribute."dai_index" { 40 token_ref "sof_tkn_dai.word" 41 } 42 43 DefineAttribute."direction" { 44 type "string" 45 constraints { 46 !valid_values [ 47 "playback" 48 "capture" 49 "duplex" 50 ] 51 } 52 } 53 54 DefineAttribute."dai_type" { 55 type "string" 56 token_ref "sof_tkn_dai.string" 57 } 58 59 DefineAttribute."default_hw_config_id" {} 60 61 DefineAttribute."name" { 62 type "string" 63 } 64 65 # Backend DAI Link ID matching with the machine driver 66 DefineAttribute."id" {} 67 68 DefineAttribute."sample_bits" { 69 # Token reference and type 70 token_ref "sof_tkn_intel_ssp.word" 71 } 72 73 DefineAttribute."bclk_delay" { 74 # Token reference and type 75 token_ref "sof_tkn_intel_ssp.word" 76 } 77 78 DefineAttribute."tdm_padding_per_slot" { 79 type "string" 80 # Token reference and type 81 token_ref "sof_tkn_intel_ssp.bool" 82 constraints { 83 !valid_values [ 84 "true" 85 "false" 86 ] 87 } 88 } 89 90 # SSP quirks. Value will translated based on sof_tkn_ssp_quirks. For ex: lb_mode will 91 # be converted to 64. 92 DefineAttribute."quirks" { 93 # Token reference and type 94 token_ref "sof_tkn_intel_ssp.word" 95 constraints { 96 !valid_values [ 97 "lbm_mode" 98 ] 99 !tuple_values [ 100 64 101 ] 102 103 } 104 } 105 106 DefineAttribute."mclk_id" { 107 # Token reference and type 108 token_ref "sof_tkn_intel_ssp.short" 109 } 110 111 # platform clock frequency 112 DefineAttribute.io_clk {} 113 114 # SSP blob version 115 DefineAttribute.version { 116 constraints { 117 !valid_values [ 118 $SSP_BLOB_VERSION_1_0 119 $SSP_BLOB_VERSION_1_5 120 ] 121 } 122 } 123 124 attributes { 125 !constructor [ 126 "name" 127 ] 128 129 !mandatory [ 130 "id" 131 "sample_bits" 132 "dai_index" 133 ] 134 135 !immutable [ 136 "dai_type" 137 ] 138 # 139 # SSP DAI objects instantiated within the same alsaconf node must have unique 140 # instance attribute 141 # 142 unique "instance" 143 } 144 145 dai_type "SSP" 146 bclk_delay 0 147 mclk_id 0 148 default_hw_config_id 0 149 clks_control 0 150 frame_pulse_width 0 151 tdm_padding_per_slot false 152 # SSP_BLOB_VERSION must be defined in the top-level topology file 153 version $SSP_BLOB_VERSION 154} 155