Loading Documentation/devicetree/bindings/sound/qcom-audio-dev.txt +3 −0 Original line number Diff line number Diff line Loading @@ -2191,6 +2191,9 @@ Optional properties: - qcom,tdm-i2s-switch-enable: For chipsets where tdm mics are controlled by switch, drive corresponding gpio to output high to enable switch. - qcom,tdm-mic-mute-enable: This property is used to mute/unmute TDM mics using gpio, drive corresponding gpio to output low to unmute TDM mics. Example: sound { Loading sound/soc/msm/apq8009-i2s-ext-codec.c +19 −0 Original line number Diff line number Diff line Loading @@ -2804,6 +2804,7 @@ static int apq8009_asoc_machine_probe(struct platform_device *pdev) const char *mclk = "qcom,msm-mclk-freq"; const char *type = NULL; int ret, id; int tdm_mic_mute_enable = -EINVAL; pdata = devm_kzalloc(&pdev->dev, sizeof(struct apq8009_asoc_mach_data), GFP_KERNEL); Loading Loading @@ -2917,6 +2918,24 @@ static int apq8009_asoc_machine_probe(struct platform_device *pdev) "qcom,tdm-i2s-switch-enable", pdev->dev.of_node->full_name); tdm_mic_mute_enable = of_get_named_gpio(pdev->dev.of_node, "qcom,tdm-mic-mute-enable", 0); if (tdm_mic_mute_enable >= 0) { dev_dbg(&pdev->dev, "%s: tdm mic mute gpio %d\n", __func__, tdm_mic_mute_enable); ret = gpio_request(tdm_mic_mute_enable, "TDM_MIC"); if (ret) { pr_err("%s: Failed to request gpio\n", __func__); goto err; } /* Pull down GPIO to unmute TDM mics */ gpio_direction_output(tdm_mic_mute_enable, 0); } else { dev_err(&pdev->dev, "Looking up %s property in node %s failed\n", "qcom,tdm-mic-mute-enable", pdev->dev.of_node->full_name); } return 0; err: if (pdata->vaddr_gpio_mux_spkr_ctl) Loading Loading
Documentation/devicetree/bindings/sound/qcom-audio-dev.txt +3 −0 Original line number Diff line number Diff line Loading @@ -2191,6 +2191,9 @@ Optional properties: - qcom,tdm-i2s-switch-enable: For chipsets where tdm mics are controlled by switch, drive corresponding gpio to output high to enable switch. - qcom,tdm-mic-mute-enable: This property is used to mute/unmute TDM mics using gpio, drive corresponding gpio to output low to unmute TDM mics. Example: sound { Loading
sound/soc/msm/apq8009-i2s-ext-codec.c +19 −0 Original line number Diff line number Diff line Loading @@ -2804,6 +2804,7 @@ static int apq8009_asoc_machine_probe(struct platform_device *pdev) const char *mclk = "qcom,msm-mclk-freq"; const char *type = NULL; int ret, id; int tdm_mic_mute_enable = -EINVAL; pdata = devm_kzalloc(&pdev->dev, sizeof(struct apq8009_asoc_mach_data), GFP_KERNEL); Loading Loading @@ -2917,6 +2918,24 @@ static int apq8009_asoc_machine_probe(struct platform_device *pdev) "qcom,tdm-i2s-switch-enable", pdev->dev.of_node->full_name); tdm_mic_mute_enable = of_get_named_gpio(pdev->dev.of_node, "qcom,tdm-mic-mute-enable", 0); if (tdm_mic_mute_enable >= 0) { dev_dbg(&pdev->dev, "%s: tdm mic mute gpio %d\n", __func__, tdm_mic_mute_enable); ret = gpio_request(tdm_mic_mute_enable, "TDM_MIC"); if (ret) { pr_err("%s: Failed to request gpio\n", __func__); goto err; } /* Pull down GPIO to unmute TDM mics */ gpio_direction_output(tdm_mic_mute_enable, 0); } else { dev_err(&pdev->dev, "Looking up %s property in node %s failed\n", "qcom,tdm-mic-mute-enable", pdev->dev.of_node->full_name); } return 0; err: if (pdata->vaddr_gpio_mux_spkr_ctl) Loading