Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01e0a18f authored by freak07's avatar freak07 Committed by Pranav Vashi
Browse files

techpack/audio: Use power efficient workingqueues

parent 948727a3
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1181,11 +1181,12 @@ static int aqt_codec_enable_dec(struct snd_soc_dapm_widget *w,
			snd_soc_update_bits(codec, hpf_gate_reg, 0x02, 0x00);
		}
		/* schedule work queue to Remove Mute */
		schedule_delayed_work(&aqt->tx_mute_dwork[decimator].dwork,
		queue_delayed_work(system_power_efficient_wq, 
					&aqt->tx_mute_dwork[decimator].dwork,
					msecs_to_jiffies(tx_unmute_delay));
		if (aqt->tx_hpf_work[decimator].hpf_cut_off_freq !=
							CF_MIN_3DB_150HZ)
			schedule_delayed_work(
			queue_delayed_work(system_power_efficient_wq, 
					&aqt->tx_hpf_work[decimator].dwork,
					msecs_to_jiffies(300));
		/* apply gain after decimator is enabled */
+3 −2
Original line number Diff line number Diff line
@@ -750,11 +750,12 @@ static int tx_macro_enable_dec(struct snd_soc_dapm_widget *w,
					    TX_HPF_CUT_OFF_FREQ_MASK,
					    CF_MIN_3DB_150HZ << 5);
		/* schedule work queue to Remove Mute */
		schedule_delayed_work(&tx_priv->tx_mute_dwork[decimator].dwork,
		queue_delayed_work(system_power_efficient_wq, 
					&tx_priv->tx_mute_dwork[decimator].dwork,
				      msecs_to_jiffies(tx_unmute_delay));
		if (tx_priv->tx_hpf_work[decimator].hpf_cut_off_freq !=
							CF_MIN_3DB_150HZ) {
			schedule_delayed_work(
			queue_delayed_work(system_power_efficient_wq,
					&tx_priv->tx_hpf_work[decimator].dwork,
#if defined(CONFIG_MACH_XIAOMI_VAYU) || defined(CONFIG_MACH_XIAOMI_NABU)
					msecs_to_jiffies(50));
+2 −2
Original line number Diff line number Diff line
@@ -589,11 +589,11 @@ static int va_macro_enable_dec(struct snd_soc_dapm_widget *w,
			snd_soc_update_bits(codec, hpf_gate_reg, 0x02, 0x00);
		}
		/* schedule work queue to Remove Mute */
		schedule_delayed_work(&va_priv->va_mute_dwork[decimator].dwork,
		queue_delayed_work(system_power_efficient_wq, &va_priv->va_mute_dwork[decimator].dwork,
				      msecs_to_jiffies(va_tx_unmute_delay));
		if (va_priv->va_hpf_work[decimator].hpf_cut_off_freq !=
							CF_MIN_3DB_150HZ)
			schedule_delayed_work(
			queue_delayed_work(system_power_efficient_wq, 
					&va_priv->va_hpf_work[decimator].dwork,
					msecs_to_jiffies(300));
		/* apply gain after decimator is enabled */
+2 −2
Original line number Diff line number Diff line
@@ -376,7 +376,7 @@ static int __msm_sdw_reg_read(struct msm_sdw_priv *msm_sdw, unsigned short reg,
			((u8 *)dest)[i] = temp;
		}
		msm_sdw->int_mclk1_enabled = true;
		schedule_delayed_work(&msm_sdw->disable_int_mclk1_work, 50);
		queue_delayed_work(system_power_efficient_wq, &msm_sdw->disable_int_mclk1_work, 50);
		goto unlock_exit;
	}
	for (i = 0; i < bytes; i++)  {
@@ -419,7 +419,7 @@ static int __msm_sdw_reg_write(struct msm_sdw_priv *msm_sdw, unsigned short reg,
			ret = msm_sdw_ahb_write_device(msm_sdw, reg + (4 * i),
						       &((u8 *)src)[i]);
		msm_sdw->int_mclk1_enabled = true;
		schedule_delayed_work(&msm_sdw->disable_int_mclk1_work, 50);
		queue_delayed_work(system_power_efficient_wq, &msm_sdw->disable_int_mclk1_work, 50);
		goto unlock_exit;
	}
	for (i = 0; i < bytes; i++)
+3 −3
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ static int msm_digcdc_clock_control(bool flag)
			}
			pr_debug("enabled digital codec core clk\n");
			atomic_set(&pdata->int_mclk0_enabled, true);
			schedule_delayed_work(&pdata->disable_int_mclk0_work,
			queue_delayed_work(system_power_efficient_wq,&pdata->disable_int_mclk0_work,
					      50);
		}
	} else {
@@ -974,13 +974,13 @@ static int msm_dig_cdc_codec_enable_dec(struct snd_soc_dapm_widget *w,
		/* enable HPF */
		snd_soc_update_bits(codec, tx_mux_ctl_reg, 0x08, 0x00);

		schedule_delayed_work(
		queue_delayed_work(system_power_efficient_wq,
			    &msm_dig_cdc->tx_mute_dwork[decimator - 1].dwork,
			    msecs_to_jiffies(tx_unmute_delay));
		if (tx_hpf_work[decimator - 1].tx_hpf_cut_of_freq !=
				CF_MIN_3DB_150HZ) {

			schedule_delayed_work(&tx_hpf_work[decimator - 1].dwork,
			queue_delayed_work(system_power_efficient_wq, &tx_hpf_work[decimator - 1].dwork,
					msecs_to_jiffies(300));
		}
		/* apply the digital gain after the decimator is enabled*/
Loading