Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH 1/2] ASoC: soc-compress: tidyup STREAM vs COMPRESS
Date: Thu, 29 Oct 2020 10:33:35 -0500	[thread overview]
Message-ID: <200088ab-d186-4c28-ea4a-ed92c105d187@linux.intel.com> (raw)
In-Reply-To: <s5hsg9xwm0h.wl-tiwai@suse.de>




>>>> 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.
>>>
>>> Yes I agree with you.
>>> I'm not sure why this duplication was created,
>>> but my patch tried to make it sane.
>>> If Mark can agree, I can post snd_compr_direction remove patch.
>>
>> Oops, snd_compr_direction was uapi.
>> We can't remove it, and can't use your above suggestion...

I knew I was missing something... Thanks for correcting my flawed assertion.

> Right, such uapi can't be removed.
> 
> Essentially both compress and PCM definitions are identical, and can
> be never different because of ABI compatibility, which means it's safe
> to mix both variants in the code.  If you're unsure, we may add
> BUILD_BUG_ON() to check the coincidence of both values.


In case we add this BUILD_BUG_ON(), can we keep the code as is then, 
there's no need to convert values?

  reply	other threads:[~2020-10-29 16:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27  1:50 [PATCH 0/2] ASoC: soc-compress: tidyup STREAM vs COMPRESS Kuninori Morimoto
2020-10-27  1:51 ` [PATCH 1/2] " Kuninori Morimoto
2020-10-27 16:05   ` Pierre-Louis Bossart
2020-10-28 23:23     ` Kuninori Morimoto
2020-10-28 23:43       ` Kuninori Morimoto
2020-10-29  7:04         ` Takashi Iwai
2020-10-29 15:33           ` Pierre-Louis Bossart [this message]
2020-10-29 16:47             ` Takashi Iwai
2020-10-30  0:48               ` Kuninori Morimoto
2020-10-27  1:51 ` [PATCH 2/2] ASoC: soc-compress: add soc_compr_cstream_to_stream() Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200088ab-d186-4c28-ea4a-ed92c105d187@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox