Lines Matching +full:prop +full:-
1 // SPDX-License-Identifier: GPL-2.0-only
3 // sdw-mockup.c -- a mockup SoundWire codec for tests where only the host
59 struct snd_soc_component *component = dai->component; in sdw_mockup_pcm_hw_params()
67 return -EINVAL; in sdw_mockup_pcm_hw_params()
69 if (!sdw_mockup->slave) in sdw_mockup_pcm_hw_params()
70 return -EINVAL; in sdw_mockup_pcm_hw_params()
75 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sdw_mockup_pcm_hw_params()
80 ret = sdw_stream_add_slave(sdw_mockup->slave, &stream_config, in sdw_mockup_pcm_hw_params()
83 dev_err(dai->dev, "Unable to configure port\n"); in sdw_mockup_pcm_hw_params()
91 struct snd_soc_component *component = dai->component; in sdw_mockup_pcm_hw_free()
95 if (!sdw_mockup->slave) in sdw_mockup_pcm_hw_free()
96 return -EINVAL; in sdw_mockup_pcm_hw_free()
98 sdw_stream_remove_slave(sdw_mockup->slave, sdw_stream); in sdw_mockup_pcm_hw_free()
111 .name = "sdw-mockup-aif1",
135 struct sdw_slave_prop *prop = &slave->prop; in sdw_mockup_read_prop() local
142 prop->paging_support = false; in sdw_mockup_read_prop()
151 prop->source_ports = BIT(8); in sdw_mockup_read_prop()
152 prop->sink_ports = BIT(1); in sdw_mockup_read_prop()
154 nval = hweight32(prop->source_ports); in sdw_mockup_read_prop()
155 prop->src_dpn_prop = devm_kcalloc(&slave->dev, nval, in sdw_mockup_read_prop()
156 sizeof(*prop->src_dpn_prop), in sdw_mockup_read_prop()
158 if (!prop->src_dpn_prop) in sdw_mockup_read_prop()
159 return -ENOMEM; in sdw_mockup_read_prop()
162 dpn = prop->src_dpn_prop; in sdw_mockup_read_prop()
163 addr = prop->source_ports; in sdw_mockup_read_prop()
172 nval = hweight32(prop->sink_ports); in sdw_mockup_read_prop()
173 prop->sink_dpn_prop = devm_kcalloc(&slave->dev, nval, in sdw_mockup_read_prop()
174 sizeof(*prop->sink_dpn_prop), in sdw_mockup_read_prop()
176 if (!prop->sink_dpn_prop) in sdw_mockup_read_prop()
177 return -ENOMEM; in sdw_mockup_read_prop()
180 dpn = prop->sink_dpn_prop; in sdw_mockup_read_prop()
181 addr = prop->sink_ports; in sdw_mockup_read_prop()
189 prop->simple_clk_stop_capable = true; in sdw_mockup_read_prop()
191 /* wake-up event */ in sdw_mockup_read_prop()
192 prop->wake_capable = 0; in sdw_mockup_read_prop()
219 struct device *dev = &slave->dev; in sdw_mockup_sdw_probe()
225 return -ENOMEM; in sdw_mockup_sdw_probe()
228 sdw_mockup->slave = slave; in sdw_mockup_sdw_probe()
230 slave->is_mockup_device = true; in sdw_mockup_sdw_probe()
247 * 0xAAAA: generic full-duplex codec
248 * 0xAA55: headset codec (mock-up of RT711/RT5682) - full-duplex
249 * 0x55AA: amplifier (mock-up of RT1308/Maxim 98373) - playback only with
251 * 0x5555: mic codec (mock-up of RT715) - capture-only
264 .name = "sdw-mockup",
274 MODULE_AUTHOR("Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>");