forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 20
Audio bringup #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
setotau
wants to merge
21
commits into
qcom-sdm660-6.15.y
Choose a base branch
from
setotau/qcom-sdm660-6.15.y-audio-bringup
base: qcom-sdm660-6.15.y
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Audio bringup #102
setotau
wants to merge
21
commits into
qcom-sdm660-6.15.y
from
setotau/qcom-sdm660-6.15.y-audio-bringup
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml
Outdated
Show resolved
Hide resolved
b4c7cae
to
e798ded
Compare
It was originally necessary, but removed upstream in commit 9e863d2
("pinctrl: qcom: lpass-lpi: Remove unused member in struct
lpi_pingroup").
I already removed it in SDM670: https://gitlab.com/sdm670-mainline/linux-patches/-/commit/4055f1db57abe5ecb7ade24b27220e975aa970f9
|
e798ded
to
731a6d6
Compare
Rebased and reworded some commits |
731a6d6
to
3769500
Compare
59468ed
to
16efd51
Compare
By default pin_offset is calculated by formula: LPI_TLMM_REG_OFFSET * pin_id. However not all platforms are using this pin_offset formula (e.g. SDM660 LPASS LPI uses a predefined array of offsets [1]), so extend lpi_pingroup struct with pin_offset field, introduce extended LPI_PINGROUP_OFFSET macro with pin_offet field and introduce LPI_FLAG_USE_PREDEFINED_PIN_OFFSET flag. This adds an ability to use predefined offset for pin if it exists. [1] https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/LA.UM.7.2.c27-07400-sdm660.0/drivers/pinctrl/qcom/pinctrl-lpi.c#L107 Signed-off-by: Nickolay Goppen <[email protected]>
Add bindings for pin controller in SDM660 Low Power Audio SubSystem LPASS). Co-Developed-by: Richard Acayan <[email protected]> Signed-off-by: Richard Acayan <[email protected]> Signed-off-by: Nickolay Goppen <[email protected]>
The Snapdragon 660 has a Low-Power Island (LPI) TLMM for configuring pins related to audio. Add the driver for this. Also, this driver uses predefined pin_offsets for each pin taken from downstream driver, which does not follow the usual 0x1000 distance between pins and uses an array with predefined offsets that do not follow any regular pattern [1]. [1] https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/LA.UM.7.2.c27-07400-sdm660.0/drivers/pinctrl/qcom/pinctrl-lpi.c#L107 Co-Developed-by: Nickolay Goppen <[email protected]> Signed-off-by: Richard Acayan <[email protected]> Signed-off-by: Nickolay Goppen <[email protected]>
The internal MI2S ports are found on devices with the internal sound card for Snapdragon 660. Add support for them. Signed-off-by: Richard Acayan <[email protected]>
Add the internal MI2S stream capabilities as specified by the audio kernel modules and configure the ports as MI2S ports. Link: https://android.googlesource.com/kernel/msm-extra/+/530cffa4cc977a348753831b163eb9d3302b954a/asoc/msm-dai-q6-v2.c#4597 Signed-off-by: Richard Acayan <[email protected]>
Add the port mappings for internal MI2S, found on the Snapdragon 660 internal sound card.
Add the internal MI2S ports found on the SDM660 internal sound card. Signed-off-by: Richard Acayan <[email protected]>
Add the ASM-AFE routing for internal MI2S ports. Signed-off-by: Richard Acayan <[email protected]>
The Snapdragon 670 and Snapdragon 660 both share the same drivers for the sound cards. These different sound cards are tasha, tavil, and internal. Add support for the internal sound card. Known issues: - the TDM frequency might be inaccurate - these sound card drivers have so many constants that might change Signed-off-by: Richard Acayan <[email protected]>
These options are essential for the SDM660 internal sound card driver to work properly. Select them. Fixes: 842b79f ("ASoC: qcom: add sdm660 internal sound card support") Reported-by: Aboothahir U <[email protected]> Signed-off-by: Richard Acayan <[email protected]>
The codec version CAJON_2_0 on the Snapdragon 670 requires touching the HPH test registers. Add the quirk so this driver can also support SDM670. Signed-off-by: Richard Acayan <[email protected]>
The digital and analog codecs communicate with each other, synchronized by an MCLK, which cannot turn off before the codecs power down. The bit clock is better managed by the sound card driver instead of the digital codec, since it (to my knowledge) does not power down the clock. Add the Q6AFE clock controller to connect the MCLK with the codecs, and a fixed clock to model a fake bit clock for consumption by the digital codec. Signed-off-by: Richard Acayan <[email protected]>
The LPASS LPI TLMM pin controller controls pins for use by the analog and digital codecs, such as the PDM bus, the digital microphone pins, and the compander pins. Add it to support the codecs. Signed-off-by: Richard Acayan <[email protected]>
The digital codec is responsible for controlling playback volume and sending PCM data to the analog codec. Add it. Signed-off-by: Richard Acayan <[email protected]>
The #clock-cells property is essential for clock nodes that are referenced by other devicetree nodes. Add the property so devices that depend on it probe successfully. Fixes: 3bce317 ("arm64: dts: qcom: sdm630: add clocks for digital and analog audio codecs") Reported-by: Aboothahir U <[email protected]> Signed-off-by: Richard Acayan <[email protected]>
The PM660L analog audio codec (PMIC revision 4) controls the headphone jack, and optionally the earpiece and speaker, at the vendor's decision. Add the analog audio codec. Signed-off-by: Richard Acayan <[email protected]>
…r services qcom,protection-domain property is required for adsp to properly APR functioning, such as: * Working q6afecc clocks * Opening AFE ports Signed-off-by: Nickolay Goppen <[email protected]>
…for clover Signed-off-by: Nickolay Goppen <[email protected]>
Add the sound card and configure the SoC generic analog and digital codecs to complete the drive-by sound support series. Signed-off-by: Richard Acayan <[email protected]>
16efd51
to
7e6ac90
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for sdm660 LPI TLMM, sdm660-internal soundcard, initial sound support for clover, clover-plus and lavender
relates #17
Thanks to @flamingradian for the most of work