Re: [PATCH 1/2] ASoC: soc-compress: tidyup STREAM vs COMPRESS

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

 





On 10/26/20 8:51 PM, Kuninori Morimoto wrote:

From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

snd_soc_runtime_activate() and
snd_soc_dai_digital_mute() need SNDRV_PCM_STREAM_xxx
instead of SND_COMPRESS_xxx.

These are bug but nothing happen because these are same value.

	enum {
		SNDRV_PCM_STREAM_PLAYBACK = 0,
		SNDRV_PCM_STREAM_CAPTURE,
		...
	};

	enum snd_compr_direction {
		SND_COMPRESS_PLAYBACK = 0,
		SND_COMPRESS_CAPTURE
	};

This patch tidyup it.


Could we use this instead:

enum snd_compr_direction {
	SND_COMPRESS_PLAYBACK = SNDRV_PCM_STREAM_PLAYBACK,
	SND_COMPRESS_CAPTURE = SNDRV_PCM_STREAM_CAPTURE
};

Or remove this duplication completely and get rid of snd_compr_direction?

I find it odd to convert two things that had no reason to be different in the first place.




[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