요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
STMicroelectronics sti ASoC cards
The sti ASoC Sound Card can be used, for all sti SoCs using internal sti-sas
codec or external codecs.
sti sound drivers allows to expose sti SoC audio interface through the
generic ASoC simple card. For details about sound card declaration please refer to
Documentation/devicetree/bindings/sound/simple-card.yaml.
1) sti-uniperiph-dai: audio dai device.
---------------------------------------
Required properties:
- compatible: "st,stih407-uni-player-hdmi", "st,stih407-uni-player-pcm-out",
"st,stih407-uni-player-dac", "st,stih407-uni-player-spdif",
"st,stih407-uni-reader-pcm_in", "st,stih407-uni-reader-hdmi",
- st,syscfg: phandle to boot-device system configuration registers
- clock-names: name of the clocks listed in clocks property in the same order
- reg: CPU DAI IP Base address and size entries, listed in same
order than the CPU_DAI properties.
- reg-names: names of the mapped memory regions listed in regs property in
the same order.
- interrupts: CPU_DAI interrupt line, listed in the same order than the
CPU_DAI properties.
- dma: CPU_DAI DMA controller phandle and DMA request line, listed in the same
order than the CPU_DAI properties.
- dma-names: identifier string for each DMA request line in the dmas property.
"tx" for "st,sti-uni-player" compatibility
"rx" for "st,sti-uni-reader" compatibility
Required properties ("st,sti-uni-player" compatibility only):
- clocks: CPU_DAI IP clock source, listed in the same order than the
CPU_DAI properties.
Optional properties:
- pinctrl-0: defined for CPU_DAI@1 and CPU_DAI@4 to describe I2S PIOs for
external codecs connection.
- pinctrl-names: should contain only one value - "default".
- st,tdm-mode: to declare to set TDM mode for unireader and uniplayer IPs.
Only compartible with IPs in charge of the external I2S/TDM bus.
Should be declared depending on associated codec.
Example:
sti_uni_player1: sti-uni-player@8d81000 {
compatible = "st,stih407-uni-player-hdmi";
#sound-dai-cells = <0>;
st,syscfg = <&syscfg_core>;
clocks = <&clk_s_d0_flexgen CLK_PCM_1>;
reg = <0x8D81000 0x158>;
interrupts = <GIC_SPI 85 IRQ_TYPE_NONE>;
dmas = <&fdma0 3 0 1>;
dma-names = "tx";
st,tdm-mode = <1>;
};
sti_uni_player2: sti-uni-player@8d82000 {
compatible = "st,stih407-uni-player-pcm-out";
#sound-dai-cells = <0>;
st,syscfg = <&syscfg_core>;
clocks = <&clk_s_d0_flexgen CLK_PCM_2>;
reg = <0x8D82000 0x158>;
interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
dmas = <&fdma0 4 0 1>;
dma-names = "tx";
};
sti_uni_player3: sti-uni-player@8d85000 {
compatible = "st,stih407-uni-player-spdif";
#sound-dai-cells = <0>;
st,syscfg = <&syscfg_core>;
clocks = <&clk_s_d0_flexgen CLK_SPDIFF>;
reg = <0x8D85000 0x158>;
interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
dmas = <&fdma0 7 0 1>;
dma-names = "tx";
};
sti_uni_reader1: sti-uni-reader@8d84000 {
compatible = "st,stih407-uni-reader-hdmi";
#sound-dai-cells = <0>;
st,syscfg = <&syscfg_core>;
reg = <0x8D84000 0x158>;
interrupts = <GIC_SPI 88 IRQ_TYPE_NONE>;
dmas = <&fdma0 6 0 1>;
dma-names = "rx";
};
2) sti-sas-codec: internal audio codec IPs driver
-------------------------------------------------
Required properties:
- compatible: "st,sti<chip>-sas-codec" .
Should be chip "st,stih416-sas-codec" or "st,stih407-sas-codec"
- st,syscfg: phandle to boot-device system configuration registers.
- pinctrl-0: SPDIF PIO description.
- pinctrl-names: should contain only one value - "default".
Example:
sti_sas_codec: sti-sas-codec {
compatible = "st,stih407-sas-codec";
#sound-dai-cells = <1>;
st,reg_audio = <&syscfg_core>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spdif_out >;
};
Example of audio card declaration:
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "sti audio card";
simple-audio-card,dai-link@0 {
/* DAC */
format = "i2s";
dai-tdm-slot-width = <32>;
cpu {
sound-dai = <&sti_uni_player2>;
};
codec {
sound-dai = <&sti_sasg_codec 1>;
};
};
simple-audio-card,dai-link@1 {
/* SPDIF */
format = "left_j";
cpu {
sound-dai = <&sti_uni_player3>;
};
codec {
sound-dai = <&sti_sasg_codec 0>;
};
};
simple-audio-card,dai-link@2 {
/* TDM playback */
format = "left_j";
frame-inversion = <1>;
cpu {
sound-dai = <&sti_uni_player1>;
dai-tdm-slot-num = <16>;
dai-tdm-slot-width = <16>;
dai-tdm-slot-tx-mask =
<1 1 1 1 0 0 0 0 0 0 1 1 0 0 1 1>;
};
codec {
sound-dai = <&sti_sasg_codec 3>;
};
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
STi ASoC card 개요
1-9STi ASoC sound card는 internal `sti-sas` codec 또는 external codec을 사용하는 모든 STi SoC에 적용할 수 있습니다. STi sound driver는 generic ASoC simple card로 SoC audio interface를 노출하며 선언 형식은 `Documentation/devicetree/bindings/sound/simple-card.yaml`을 따릅니다.
Uniperipheral DAI 필수 자원
10-41`sti-uniperiph-dai` compatible은 HDMI·PCM output·DAC·SPDIF player와 PCM input·HDMI reader용 `st,stih407-*` 문자열 중 하나입니다. `st,syscfg`는 boot-device system configuration register phandle입니다.
`clock-names`, `reg`·`reg-names`, `interrupts`, `dma`는 CPU DAI property 순서와 일치해야 합니다. `dma-names`는 uniplayer에서 `tx`, unireader에서 `rx`입니다. Uniplayer compatible에서는 CPU DAI IP clock source인 `clocks`도 필수입니다.
I2S pinctrl과 TDM mode
42-51External codec용 I2S PIO를 설명할 때 CPU_DAI@1·@4에 `pinctrl-0`을 두며 `pinctrl-names`는 `default` 하나입니다. `st,tdm-mode`는 external I2S/TDM bus 담당 unireader·uniplayer에서 codec에 맞춰 TDM mode를 선언합니다.
Player·reader 예제
52-97예제는 HDMI TDM player1, PCM-out player2, SPDIF player3와 HDMI reader1을 정의합니다. 각 node는 syscfg, register, interrupt, FDMA request와 `tx` 또는 `rx` DMA name을 연결합니다.
sti_uni_player1: sti-uni-player@8d81000 {
compatible = "st,stih407-uni-player-hdmi";
#sound-dai-cells = <0>;
st,syscfg = <&syscfg_core>;
clocks = <&clk_s_d0_flexgen CLK_PCM_1>;
reg = <0x8D81000 0x158>;
interrupts = <GIC_SPI 85 IRQ_TYPE_NONE>;
dmas = <&fdma0 3 0 1>;
dma-names = "tx";
st,tdm-mode = <1>;
};
sti_uni_player2: sti-uni-player@8d82000 {
compatible = "st,stih407-uni-player-pcm-out";
#sound-dai-cells = <0>;
st,syscfg = <&syscfg_core>;
clocks = <&clk_s_d0_flexgen CLK_PCM_2>;
reg = <0x8D82000 0x158>;
interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
dmas = <&fdma0 4 0 1>;
dma-names = "tx";
};
sti_uni_player3: sti-uni-player@8d85000 {
compatible = "st,stih407-uni-player-spdif";
#sound-dai-cells = <0>;
st,syscfg = <&syscfg_core>;
clocks = <&clk_s_d0_flexgen CLK_SPDIFF>;
reg = <0x8D85000 0x158>;
interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
dmas = <&fdma0 7 0 1>;
dma-names = "tx";
};
sti_uni_reader1: sti-uni-reader@8d84000 {
compatible = "st,stih407-uni-reader-hdmi";
#sound-dai-cells = <0>;
st,syscfg = <&syscfg_core>;
reg = <0x8D84000 0x158>;
interrupts = <GIC_SPI 88 IRQ_TYPE_NONE>;
dmas = <&fdma0 6 0 1>;
dma-names = "rx";
};
Internal STI SAS codec
98-110`sti-sas-codec`의 `compatible`은 `st,stih416-sas-codec` 또는 `st,stih407-sas-codec`입니다. `st,syscfg`는 boot-device system configuration phandle, `pinctrl-0`은 SPDIF PIO, `pinctrl-names`는 `default`입니다.
STIH407 SAS codec 예제
111-119예제는 STIH407 SAS codec을 1-cell sound DAI로 선언하고 syscfg와 SPDIF pinctrl을 연결합니다. 원문 property는 앞의 `st,syscfg` 설명과 달리 `st,reg_audio`를 사용합니다.
sti_sas_codec: sti-sas-codec {
compatible = "st,stih407-sas-codec";
#sound-dai-cells = <1>;
st,reg_audio = <&syscfg_core>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spdif_out >;
};
Simple card DAI link topology
120-164Simple card는 player2와 SAS codec DAI 1을 I2S DAC로, player3과 codec DAI 0을 left-justified SPDIF로, player1과 codec DAI 3을 16-slot TDM playback으로 연결합니다. TDM link는 16-bit slot과 explicit TX mask를 사용합니다.
세 CPU uniplayer와 STI SAS codec DAI 연결을 구조화했습니다.
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "sti audio card";
simple-audio-card,dai-link@0 {
/* DAC */
format = "i2s";
dai-tdm-slot-width = <32>;
cpu {
sound-dai = <&sti_uni_player2>;
};
codec {
sound-dai = <&sti_sasg_codec 1>;
};
};
simple-audio-card,dai-link@1 {
/* SPDIF */
format = "left_j";
cpu {
sound-dai = <&sti_uni_player3>;
};
codec {
sound-dai = <&sti_sasg_codec 0>;
};
};
simple-audio-card,dai-link@2 {
/* TDM playback */
format = "left_j";
frame-inversion = <1>;
cpu {
sound-dai = <&sti_uni_player1>;
dai-tdm-slot-num = <16>;
dai-tdm-slot-width = <16>;
dai-tdm-slot-tx-mask =
<1 1 1 1 0 0 0 0 0 0 1 1 0 0 1 1>;
};
codec {
sound-dai = <&sti_sasg_codec 3>;
};
};
};
요약과 해설
st,sti-asoc-card.txt:1-164STi uniperipheral DAI, internal SAS codec와 simple-card DAI topology를 설명합니다. 영어 원문 전체와 줄 좌표를 보존하며 한국어 전문 번역에서는 property·수치·clock·phandle·예제 코드를 원형대로 유지합니다.