OSDN Git Service

ASoC: audio-graph-card2: check also dpcm node for convert-xxx
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 1 Nov 2022 04:22:27 +0000 (04:22 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 7 Nov 2022 13:58:07 +0000 (13:58 +0000)
commit8f5979833b45b318d0971f384de3fb17924042f0
tree45720099aea4a6dbb8c3e7e3218249b3bfe1d124
parent2dc025aba7fbebd6c6f3a05bc3530af31776a6fa
ASoC: audio-graph-card2: check also dpcm node for convert-xxx

DPCM connection on Card2, its DT looks like below.
Current Card2 is checking (a)/(b) part only for convert-xxx settings.
But it is not useful. This patch enables its settings at (A)/(B) part
too. (A)/(B) settings will be overwritten (a)/(b) settings if it has.

<Image>       (A) (a)
Card2 <--+--> FE <---> CPU
 |
 +--> BE <---> Codec
      (B) (b)

<DT>
card2-sound {
...
links = <fe, be>; /* (A) (B) */
};

dpcm {
/* FE */
ports@0 {
/* (A) */
fe: port { fe_ep: endpoint { remote-endpoint = <&cpu_ep>; } };
};
/* BE */
ports@1 {
/* (B) */
be: port {
convert-rate = <44100>; /* This patch enables this */
be_ep: endpoint { remote-endpoint = <&codec_ep>; }
};
};
};

cpu {
/* CPU (a) */
port { cpu_ep: endpoint { remote-endpoint = <&fe_ep>; } };
};

codec {
/* Codec (b) */
port {
convert-rate = <48000>; /* (B) settings will be over written here */
codec_ep: endpoint { remote-endpoint = <&be_ep>; }
};
};

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871qqn8fst.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/audio-graph-card2.c