Skip to content

Enable Audio Support on Nord Platform - #975

Open
mohsRafi wants to merge 8 commits into
qualcomm-linux:staging/nordfrom
mohsRafi:Enable_NORD_audio
Open

Enable Audio Support on Nord Platform#975
mohsRafi wants to merge 8 commits into
qualcomm-linux:staging/nordfrom
mohsRafi:Enable_NORD_audio

Conversation

@mohsRafi

Copy link
Copy Markdown
Contributor

This PR patch enables basic audio support on the Qualcomm Nord platform by adding the required machine driver, device tree bindings, codec support, and platform DT updates for playback and capture paths using the PCM1681 DAC and ADAU1979 ADC connected through AUD_INTF8 (QAIF/TDM). The series also introduces the GPR node required for audio DSP communication and updates the arm64 defconfig to enable the necessary codec drivers. The audio hardware configuration is based on the Nord audio architecture utilizing PCM1681 for playback and ADAU1979 for capture.

The ADAU1977 I2C driver lacks an OF device match table, preventing
it from binding to codec instances described via Device Tree. Systems
using compatible strings such as "adi,adau1977", "adi,adau1978", or
"adi,adau1979" fail to probe the driver as a result.

Add an of_match_table covering all three variants and wire it into
the I2C driver struct to enable DT-based driver matching.

Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Register "qcom,nord-ride-sndcard" as a valid compatible string in the
qcom,sm8250 sound card binding. This covers both the nord-rrd and
nord-ride-sx board variants that share the same soundcard driver.

Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Add machine driver support for the nord soundcard
(qcom,nord-ride-sndcard). The nord platform uses PCM1681 for playback
and ADAU1977 for capture over Tertiary MI2S, with the codec system
clock sourced from LRCLK.

Introduce a nord_ride_priv_data descriptor that sets the driver name,
enables codec sysclk configuration, selects LRCLK as the sysclk
source, and applies the appropriate codec DAI format. Refactor shared
MI2S and TDM helpers in common.c and q6apm-lpass-dais.c to support
the per-card private data cleanly.

Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
The PCM1681 DAC requires the SCK (system clock) input to be
present for proper device operation. On platforms where SCK
is provided by a controllable clock source, register accesses
over I2C may fail when the clock is not enabled.

Add optional clock support to the PCM1681 driver by acquiring
the "sclk" clock, enabling it during probe, and registering a
managed cleanup action to disable it during device removal or
probe failure.

This allows platforms to model the PCM1681 system clock through
the common clock framework and ensures the device is operational
before regmap initialization and register accesses occur.

Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Add the GPR (Generic Packet Router) node to the nord SoC DTSI along
with the APM (Audio Process Manager) and PRM (Proxy Resource Manager)
audio services. These nodes are required by the Q6APM audio stack to
route audio packets between the application processor and the DSP.

Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Enable audio on the nord RRD board. Add a soundcard node using the
qcom,nord-ride-sndcard compatible with two DAI links:
  - PCM1681 playback over Tertiary MI2S RX
  - ADAU1977 capture over Tertiary MI2S TX

Add MI2S pin mux states (data, SCLK, WS on GPIO 73-76) and MCLK pin
states (MCLK0/MCLK1 on GPIO 99/100) to nord-embedded.dtsi so they
can be shared with other nord board variants. Pull in nord-pmics.dtsi
for the PMIC nodes required by the audio regulators.

Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Enable audio on the nord-ride-sx board. Add a soundcard node using
the qcom,nord-ride-sndcard compatible with two DAI links:
  - PCM1681 playback over Tertiary MI2S RX
  - ADAU1977 capture over Tertiary MI2S TX

Add a fixed 3.3 V pre-regulator node and PCM1681/ADAU1979 codec
nodes on I2C18, with the PCM1681 system clock supplied via MCLK0.

Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Select SND_SOC_PCM1681 and SND_SOC_ADAU1977_I2C to build the TI
PCM1681 DAC and Analog Devices ADAU1977 ADC drivers needed by the
nord soundcard. Remove the corresponding entries from prune.config
since PCA953X GPIO expander is now required for nord board support.

Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>

@nandamajay nandamajay left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants