On 06/03/2025 16:05, Amadeusz Sławiński wrote:
> On 3/6/2025 2:35 PM, Peter Ujfalusi wrote:
>> Implement the three callbacks that is needed to enable support for
>> reporting the mic privacy change via soundwire.
>>
>> In PTL the mic privacy reporting is supported via soundwire and DMIC and
>> the soundwire is owned by the host, it's interrupt is routed there.
>>
>> To enable the interrupt, the sublink mask needs to be passed to the
>> multilink layer, the check_mic_privacy_irq/process_mic_privacy callbacks
>> needs to be implemented to check and report the mic privacy change.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>
>> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@xxxxxxxxxxxxxxx>
>> Reviewed-by: Liam Girdwood <liam.r.girdwood@xxxxxxxxx>
>> Reviewed-by: Kai Vehmanen <kai.vehmanen@xxxxxxxxxxxxxxx>
>> ---
>> sound/soc/sof/intel/ptl.c | 58 +++++++++++++++++++++++++++++++++++++--
>> sound/soc/sof/intel/ptl.h | 5 ++++
>> 2 files changed, 61 insertions(+), 2 deletions(-)
>>
>> diff --git a/sound/soc/sof/intel/ptl.c b/sound/soc/sof/intel/ptl.c
>> index ae8e9e08ad2a..eeb86c228b2a 100644
>> --- a/sound/soc/sof/intel/ptl.c
>> +++ b/sound/soc/sof/intel/ptl.c
>> @@ -18,10 +18,62 @@
>> #include "lnl.h"
>> #include "ptl.h"
>> -int sof_ptl_set_ops(struct snd_sof_dev *sdev, struct
>> snd_sof_dsp_ops *dsp_ops)
>> +static bool sof_ptl_check_mic_privacy_irq(struct snd_sof_dev *sdev,
>> bool alt,
>> + int elid)
>> +{
>> + if (alt != 1 || elid != AZX_REG_ML_LEPTR_ID_SDW)
>
> alt is bool, so let's be type aware and either "alt != true" or just "!
> alt"?
Sure, I can't explain why it ended up like this.
>
>> + return false;
>> +
>> + return hdac_bus_eml_is_mic_privacy_changed(sof_to_bus(sdev), alt,
>> elid);
>> +}
>> +
>> +static void sof_ptl_process_mic_privacy(struct snd_sof_dev *sdev,
>> bool alt,
>> + int elid)
>> +{
>> + bool state;
>> +
>> + if (alt != 1 || elid != AZX_REG_ML_LEPTR_ID_SDW)
>
> same here
>
--
Péter
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]