mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>,
	Srinivas Kandagatla <srini@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ASoC: qcom: audioreach: Add support for Speaker Protection module
Date: Fri, 29 Aug 2025 08:44:11 +0200	[thread overview]
Message-ID: <ba78f528-dd3c-49b6-920a-0c0758946f16@linaro.org> (raw)
In-Reply-To: <2566eea5-a153-42e6-9a43-1c0af5a4c11c@oss.qualcomm.com>

On 22/08/2025 12:39, Srinivas Kandagatla wrote:
>> +static int audioreach_speaker_protection(struct q6apm_graph *graph,
>> +					 struct audioreach_module *module,
>> +					 uint32_t operation_mode)
>> +{
>> +	return audioreach_send_u32_param(graph, module, PARAM_ID_SP_OP_MODE,
>> +					 operation_mode);
>> +}
>> +
>> +
>>  int audioreach_set_media_format(struct q6apm_graph *graph, struct audioreach_module *module,
>>  				struct audioreach_module_config *cfg)
>>  {
>> @@ -1299,6 +1308,10 @@ int audioreach_set_media_format(struct q6apm_graph *graph, struct audioreach_mod
>>  	case MODULE_ID_GAPLESS:
>>  		rc = audioreach_gapless_set_media_format(graph, module, cfg);
>>  		break;
>> +	case MODULE_ID_SPEAKER_PROTECTION:
>> +		rc = audioreach_speaker_protection(graph, module,
>> +						   PARAM_ID_SP_OP_MODE_CALIBRATION);
> 
> Are we leaving this in calibration mode forever? When does the mode change?

That should be a normal mode, thanks for catching this.

> 
>> +		break;
>>  	default:
>>  		rc = 0;
>>  	}
>> diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audioreach.h
>> index 790fba96e34d..0ad566e45e09 100644
>> --- a/sound/soc/qcom/qdsp6/audioreach.h
>> +++ b/sound/soc/qcom/qdsp6/audioreach.h
>> @@ -31,6 +31,7 @@ struct q6apm_graph;
>>  #define MODULE_ID_MP3_DECODE		0x0700103B
>>  #define MODULE_ID_GAPLESS		0x0700104D
>>  #define MODULE_ID_DISPLAY_PORT_SINK	0x07001069
>> +#define MODULE_ID_SPEAKER_PROTECTION	0x070010E2
>>  
>>  #define APM_CMD_GET_SPF_STATE		0x01001021
>>  #define APM_CMD_RSP_GET_SPF_STATE	0x02001007
>> @@ -542,6 +543,16 @@ struct data_logging_config {
>>  	uint32_t mode;
>>  } __packed;
>>  
>> +/* Speaker Protection */
>> +#define PARAM_ID_SP_OP_MODE			0x080011e9
> 
> 
> Are we missing
> 
> #define PARAM_ID_SP_OP_MODE_NORMAL		0

I'll double check with the docs, but indeed feels like that.

> ?
> 
>> +#define PARAM_ID_SP_OP_MODE_CALIBRATION		1
>> +#define PARAM_ID_SP_OP_MODE_FACTORY_TEST	2
>> +#define PARAM_ID_SP_OP_MODE_VALIDATION		3
> 
>> +



Best regards,
Krzysztof

  reply	other threads:[~2025-08-29  6:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-21 14:16 Krzysztof Kozlowski
2025-08-21 14:16 ` [PATCH 2/2] ASoC: qcom: audioreach: Add support for VI Sense module Krzysztof Kozlowski
2025-08-22 10:55   ` Srinivas Kandagatla
2025-08-29  6:45     ` Krzysztof Kozlowski
2025-09-03  9:34   ` Konrad Dybcio
2025-08-22 10:39 ` [PATCH 1/2] ASoC: qcom: audioreach: Add support for Speaker Protection module Srinivas Kandagatla
2025-08-29  6:44   ` Krzysztof Kozlowski [this message]
2025-09-03  9:31 ` Konrad Dybcio
2025-09-03 10:03   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba78f528-dd3c-49b6-920a-0c0758946f16@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=srini@kernel.org \
    --cc=srinivas.kandagatla@oss.qualcomm.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®