Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: linux@audioscience.com
Cc: Eliot Blennerhassett <eblennerhassett@audioscience.com>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH - asihpi 2/2] Disable S24_3LE incompatible with 2^N buffer size.
Date: Thu, 19 Jun 2008 11:39:53 +0200	[thread overview]
Message-ID: <s5hr6at9312.wl%tiwai@suse.de> (raw)
In-Reply-To: <1213841713-20114-1-git-send-email-linux@audioscience.com>

At Thu, 19 Jun 2008 14:15:13 +1200,
linux@audioscience.com wrote:
> 
> From: Eliot Blennerhassett <eblennerhassett@audioscience.com>
> 
> 
> Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
> 
> diff --git a/pci/asihpi/asihpi.c b/pci/asihpi/asihpi.c
> index ab90b08..c715ad2 100644
> --- a/pci/asihpi/asihpi.c
> +++ b/pci/asihpi/asihpi.c
> @@ -328,21 +328,28 @@ static void print_hwparams(struct snd_pcm_hw_params *p)
>  
>  static snd_pcm_format_t hpi_to_alsa_formats[] = {
>  	-1,			/* INVALID */
> -	SNDRV_PCM_FORMAT_U8,	/* { HPI_FORMAT_PCM8_UNSIGNED        1 */
> -	SNDRV_PCM_FORMAT_S16,	/* { HPI_FORMAT_PCM16_SIGNED         2 */
> -	-1,			/* { HPI_FORMAT_MPEG_L1              3 */
> -	SNDRV_PCM_FORMAT_MPEG,	/* { HPI_FORMAT_MPEG_L2              4 */
> -	SNDRV_PCM_FORMAT_MPEG,	/* { HPI_FORMAT_MPEG_L3              5 */
> -	-1,			/* { HPI_FORMAT_DOLBY_AC2            6 */
> -	-1,			/* { HPI_FORMAT_DOLBY_AC3            7 */
> -	SNDRV_PCM_FORMAT_S16_BE,/* { HPI_FORMAT_PCM16_BIGENDIAN      8 */
> -	-1,			/* { HPI_FORMAT_AA_TAGIT1_HITS       9 */
> -	-1,			/* { HPI_FORMAT_AA_TAGIT1_INSERTS   10 */
> -	SNDRV_PCM_FORMAT_S32,	/* { HPI_FORMAT_PCM32_SIGNED        11 */
> -	-1,			/* { HPI_FORMAT_RAW_BITSTREAM       12 */
> -	-1,			/* { HPI_FORMAT_AA_TAGIT1_HITS_EX1  13 */
> -	SNDRV_PCM_FORMAT_FLOAT,	/* { HPI_FORMAT_PCM32_FLOAT         14 */
> -	SNDRV_PCM_FORMAT_S24	/* { HPI_FORMAT_PCM24_SIGNED        15 */
> +	SNDRV_PCM_FORMAT_U8,	/* HPI_FORMAT_PCM8_UNSIGNED        1 */
> +	SNDRV_PCM_FORMAT_S16,	/* HPI_FORMAT_PCM16_SIGNED         2 */
> +	-1,			/* HPI_FORMAT_MPEG_L1              3 */
> +	SNDRV_PCM_FORMAT_MPEG,	/* HPI_FORMAT_MPEG_L2              4 */
> +	SNDRV_PCM_FORMAT_MPEG,	/* HPI_FORMAT_MPEG_L3              5 */
> +	-1,			/* HPI_FORMAT_DOLBY_AC2            6 */
> +	-1,			/* HPI_FORMAT_DOLBY_AC3            7 */
> +	SNDRV_PCM_FORMAT_S16_BE,/* HPI_FORMAT_PCM16_BIGENDIAN      8 */
> +	-1,			/* HPI_FORMAT_AA_TAGIT1_HITS       9 */
> +	-1,			/* HPI_FORMAT_AA_TAGIT1_INSERTS   10 */
> +	SNDRV_PCM_FORMAT_S32,	/* HPI_FORMAT_PCM32_SIGNED        11 */
> +	-1,			/* HPI_FORMAT_RAW_BITSTREAM       12 */
> +	-1,			/* HPI_FORMAT_AA_TAGIT1_HITS_EX1  13 */
> +	SNDRV_PCM_FORMAT_FLOAT,	/* HPI_FORMAT_PCM32_FLOAT         14 */
> +#if 1
> +	/* ALSA can't handle 3 byte sample size together with power-of-2
> +	 *  constraint on buffer_bytes, so disable this format
> +	 */
> +	-1
> +#else
> +	/* SNDRV_PCM_FORMAT_S24_3LE */	/* { HPI_FORMAT_PCM24_SIGNED        15 */
> +#endif

Just out of curiosity: how handle 3 bytes format and the power-of-two
buffer bytes in other OS?  Adding pads?


Takashi

      parent reply	other threads:[~2008-06-19  9:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-19  2:15 [PATCH - asihpi 2/2] Disable S24_3LE incompatible with 2^N buffer size linux
2008-06-19  8:30 ` Jaroslav Kysela
2008-06-19  9:39 ` Takashi Iwai [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=s5hr6at9312.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=eblennerhassett@audioscience.com \
    --cc=linux@audioscience.com \
    /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