[alsa-devel] simle-card DT style for DPCM

Kuninori Morimoto kuninori.morimoto.gx at gmail.com
Mon Sep 8 10:50:53 CEST 2014


Hi Lars

Thank you for your feedback

> >       compatible = "simple-audio-card"; # normal simple-card
> >
> >       compatible = "soc-audio-card";    # special sound card
> >                                         # we use DPCM this time
> 
> If there is no difference in hardware there shouldn't be any difference in 
> the hardware description.
> 
> Lets try to get to the bottom of the problem. Why do you want to enable DPCM 
> on some cards and not enable it on others?

2 reasons for enabling DPCM
 1. to use "sampling rate convert"
 2. we need to use multi CPU (2cpu + 1codec)

2nd case is required in our next SoC.

About 1st case, Mark already agreed this style

-- use DPCM for sampling-rate-convert --
sound {
	compatible = "simple-audio-card";
	...

	simple-audio-card,dai-link {
		...
		sampling-rate-convert = <xxx>;
		cpu {
			...
		};
		codec {
			...
		};
	}
}

	FE-cpu   : cpu
        FE-codec : dummy

        BE-cpu   : dummy
        BE-codec : codec

------------------

We can decide "normal style" or "DPCM style" by checking
"sampling-rate-convert" property. This is easy.

2nd case is my confusion. I suggested this

-- use DPCM for multi DAI --
sound {
	compatible = "simple-audio-card";
	...

	simple-audio-card,dai-link {
		...
		cpu at 0 {
			...
		};
		cpu at 1 {
			...
		};
		codec at 1 {
			...
		};
	}
}

	FE-cpu   : cpu at 0
        FE-codec : dummy

        BE-cpu   : cpu at 1
        BE-codec : codec at 1
---------------------

but Mark rejected. His comment is this

    I think here what I'd expect to see is only one CPU DAI specified for
    the back end link in the CPU that is actually linked to the CODEC and
    the front ends being worked out by the drivers, unless there are systems
    where the set of front ends can be configured at system build time (as
    opposed to from software at runtime) somehow.

If my understanding was correct,
I think we can care it if DTS file was...

------------------------
sound {
	compatible = "simple-audio-card";
	...

	dai-link: simple-audio-card,dai-link {
		...
		cpu at 1 { ... };
		codec at 1 { ... };
	}
}

&dai-link {
	cpu at 0 { ... };
};
------------------------

We can create everything/something in C code. I have no concern about it.
I need to know DT style of "multi cpu system on simple-card"
(= we will use DPCM in this case)
It is easy to understand for me if Mark/you can show me your idea of DT style.

best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list