From: Jurgen Kramer <gtmkramer@xs4all.nl>
To: alsa-devel@alsa-project.org
Cc: Jurgen Kramer <gtmkramer@xs4all.nl>
Subject: [PATCH v2] pcm: 2nd round of pcm_misc DSD fixes
Date: Fri, 22 Aug 2014 10:15:10 +0200 [thread overview]
Message-ID: <1408695310-7489-1-git-send-email-gtmkramer@xs4all.nl> (raw)
Functions 'snd_pcm_format_silence_64' and 'snd_pcm_format_size' also need to be
able to handle the DSD smaple format.
Changes from v1:
- Correct silence pattern for DSD
Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
---
src/pcm/pcm_misc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/pcm/pcm_misc.c b/src/pcm/pcm_misc.c
index 24d52f9..46fc771 100644
--- a/src/pcm/pcm_misc.c
+++ b/src/pcm/pcm_misc.c
@@ -317,11 +317,13 @@ ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples)
switch (format) {
case SNDRV_PCM_FORMAT_S8:
case SNDRV_PCM_FORMAT_U8:
+ case SNDRV_PCM_FORMAT_DSD_U8:
return samples;
case SNDRV_PCM_FORMAT_S16_LE:
case SNDRV_PCM_FORMAT_S16_BE:
case SNDRV_PCM_FORMAT_U16_LE:
case SNDRV_PCM_FORMAT_U16_BE:
+ case SNDRV_PCM_FORMAT_DSD_U16_LE:
return samples * 2;
case SNDRV_PCM_FORMAT_S18_3LE:
case SNDRV_PCM_FORMAT_S18_3BE:
@@ -390,6 +392,9 @@ u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format)
return 0;
case SNDRV_PCM_FORMAT_U8:
return 0x8080808080808080ULL;
+ case SNDRV_PCM_FORMAT_DSD_U8:
+ case SNDRV_PCM_FORMAT_DSD_U16_LE:
+ return 0x6969696969696969ULL;
#ifdef SNDRV_LITTLE_ENDIAN
case SNDRV_PCM_FORMAT_U16_LE:
return 0x8000800080008000ULL;
--
1.9.3
next reply other threads:[~2014-08-22 8:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 8:15 Jurgen Kramer [this message]
2014-08-22 9:16 ` [PATCH v2] pcm: 2nd round of pcm_misc DSD fixes Takashi Iwai
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=1408695310-7489-1-git-send-email-gtmkramer@xs4all.nl \
--to=gtmkramer@xs4all.nl \
--cc=alsa-devel@alsa-project.org \
/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.