Re: About snd_soc_dai_set_fmt()

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



Hi

> Some use cases require that the format of transmitter and receiver
> are different. Shall we define a new .set_fmt_xxx() function to support
> setting fmt for transmitter and receiver separately?

Not for format, but we already have the DAI that Playback/Capture are not
sync. In such case, we can have 2 DAIs, 1 is for Playback, and 1 is for Capture.

So, maybe you use similar idea, like below ?
Playback/Capture have different .set_fmt function.

	struct snd_soc_dai_ops dac_ops = {
		.set_fmt = dac_set_dai_fmt,
		...
	};

	struct snd_soc_dai_ops adc_ops = {
		.set_fmt = adc_set_dai_fmt,
	};

	static struct snd_soc_dai_driver my_dais[] = {
	{
		.name = "my DAC",
		.playback = {
			...
			.formats = DAC_FORMAT,
		},
		.ops = &dac_ops
	},
	{
		.name = "my ADC",
		.capture = {
			...
			.formats = ADC_FORMAT
		},
		.ops = &adc_ops
	}};


Thank you for your help !!
Best regards
---
Kuninori Morimoto




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux