Re: How to handle complex Codec2Codec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mark

> > We want to have new style connection which is more flexible, and is
> > possible to handle all connection in same way ?
> > ... that may be an exaggeration.
> 
> Yeah, at a super high level we want to be able to handle digital audio
> with DAPM like analog audio, the main thing is we'd need to propagate
> digital parameters along as well as just on/off status, and support
> conversions.

Very rough speaking, we don't want to break existing connections
(normal, DPCM, Codec2Codec, etc), and enable to use new style right ?
Let's name current style as PCMv1. I think we want to grouping related
things into one place, let's say soc-pcm.c, in roughly.

And make new style (PCMv2) at soc-pcm2.c, for example.
Then, we can swtich v1 or v2 somehow, like below ?

	-------- soc-pcm.c -----
	struct pcm_connection pcm1_connection = {
		.ver = 1,
		.new_pcm = soc_new_pcm,
		...
	};
	-------- soc-pcm2.c -----
	struct pcm_connection pcm2_connection = {
		.ver = 2,
		.new_pcm = new_pcm,
		...
	};
	-------- soc-core.c -----
	if (ver == v1)
		connection = pcm1_connection
	else (ver == v2)
		connection = pcm2_connection

-	ret = soc_new_pcm(rtd, num);
+	ret = connection->new_pcm(rtd, num);

We can create PCMv3, v4, v5... in the future if existing connection
style was not good enough. ... well... this is almost "ideal" ;P


Thank you for your help !!

Best regards
---
Kuninori Morimoto



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux