All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Takashi Sakamoto <o-takashi@sakamocchi.jp>
Subject: [alsa-lib][PATCH v3 4/4] pcm: plug: add SND_PCM_FORMAT_{S, U}20 to linear_preferred_formats
Date: Thu, 14 Dec 2017 14:54:29 +0100	[thread overview]
Message-ID: <f3a74ca0-a602-ebe6-625c-03e2d77e2702@maciej.szmigiero.name> (raw)
In-Reply-To: <cover.1513257270.git.mail@maciej.szmigiero.name>

This commit adds the recently added formats SND_PCM_FORMAT_{S,U}20 to
the linear_preferred_formats array in pcm_plug.
Let's give them lower priority than more standard S24 formats but a higher
priority than less typical 3-byte versions.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
---
 src/pcm/pcm_plug.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/pcm/pcm_plug.c b/src/pcm/pcm_plug.c
index f1d7792db709..abf6f1ab9751 100644
--- a/src/pcm/pcm_plug.c
+++ b/src/pcm/pcm_plug.c
@@ -138,6 +138,17 @@ static const snd_pcm_format_t linear_preferred_formats[] = {
 	SND_PCM_FORMAT_S24_LE,
 	SND_PCM_FORMAT_U24_LE,
 #endif
+#ifdef SND_LITTLE_ENDIAN
+	SND_PCM_FORMAT_S20_LE,
+	SND_PCM_FORMAT_U20_LE,
+	SND_PCM_FORMAT_S20_BE,
+	SND_PCM_FORMAT_U20_BE,
+#else
+	SND_PCM_FORMAT_S20_BE,
+	SND_PCM_FORMAT_U20_BE,
+	SND_PCM_FORMAT_S20_LE,
+	SND_PCM_FORMAT_U20_LE,
+#endif
 #ifdef SND_LITTLE_ENDIAN
 	SND_PCM_FORMAT_S24_3LE,
 	SND_PCM_FORMAT_U24_3LE,

      parent reply	other threads:[~2017-12-14 13:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1513257270.git.mail@maciej.szmigiero.name>
2017-12-14 13:51 ` [alsa-lib][PATCH v3 1/4] asound.h: add SNDRV_PCM_FORMAT_{S, U}20 Maciej S. Szmigiero
2017-12-14 13:52 ` [alsa-lib][PATCH v3 2/4] pcm: add and describe SND_PCM_FORMAT_{S, U}20 Maciej S. Szmigiero
2017-12-14 13:53 ` [alsa-lib][PATCH v3 3/4] pcm: linear, route: handle linear formats with 20-bit sample on 4 bytes Maciej S. Szmigiero
2017-12-14 13:54 ` Maciej S. Szmigiero [this message]

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=f3a74ca0-a602-ebe6-625c-03e2d77e2702@maciej.szmigiero.name \
    --to=mail@maciej.szmigiero.name \
    --cc=alsa-devel@alsa-project.org \
    --cc=o-takashi@sakamocchi.jp \
    --cc=perex@perex.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.