All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Hofman <pavel.hofman@ivitera.com>
To: Jaroslav Kysela <perex@perex.cz>
Cc: alsa-devel <alsa-devel@alsa-project.org>
Subject: Re: Rates/formats available upstream from the plug plugin
Date: Tue, 03 Aug 2010 16:17:47 +0200	[thread overview]
Message-ID: <4C58250B.8000204@ivitera.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1008031542320.4068@eeebox2.perex-int.cz>

Jaroslav Kysela napsal(a):
> On Tue, 3 Aug 2010, Pavel Hofman wrote:
> 
>> Hi,
>>
>> mplayer checks hw_params for availability of the current format
>> http://mplayer-ww.git.sourceforge.net/git/gitweb.cgi?p=mplayer-ww/mplayer-ww;a=blob;f=libao2/ao_alsa.c;h=57f0bd07cb5ec300d327682a0b5209ba9dc10e30;hb=09ab9f6346aaf15d20792ca3df761a45fe46d83d#l514
>>
>> . If the check fails, it uses 16bits as fixed default.
>>
>> Now if we define the card to be plughw:0, the check still fails for
>> formats unsupported directly by the card. Which in fact is incorrect
>> since the plug plugin takes care of most formats known. The same holds
>> for sample rates.
> 
> It works for me:
> 
> perex@eeebox2:~/alsa/alsa-lib/test> ./pcm
> Playback device is plughw:0,0
> Stream parameters are 44100Hz, S16_LE, 1 channels
> Sine wave rate is 440.0000Hz
> Using transfer method: write
> test format float_le: 0
> test format mpeg: -22
> 
> Using modified alsa-lib/test/pcm.c code:
> 
> diff --git a/test/pcm.c b/test/pcm.c
> index abb83e4..0582891 100644
> --- a/test/pcm.c
> +++ b/test/pcm.c
> @@ -106,6 +106,8 @@ static int set_hwparams(snd_pcm_t *handle,
>          printf("Broken configuration for playback: no configurations
> available: %s\n", snd_strerror(err));
>          return err;
>      }
> +    printf("test format float_le: %i\n",
> snd_pcm_hw_params_test_format(handle, params, SND_PCM_FORMAT_FLOAT_LE));
> +    printf("test format mpeg: %i\n",
> snd_pcm_hw_params_test_format(handle, params, SND_PCM_FORMAT_MPEG));
>      /* set hardware resampling */
>      err = snd_pcm_hw_params_set_rate_resample(handle, params, resample);
>      if (err < 0) {
> 
> 
> Could you describe you hw configuration or can you reproduce this issue
> with the snd-dummy module?
> 

Thanks for your reply. How do you compile the test directory? Neither
gitcompile nor make in the test dir did the trick. Thanks,

Pavel.

  reply	other threads:[~2010-08-03 14:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03 13:13 Rates/formats available upstream from the plug plugin Pavel Hofman
2010-08-03 13:44 ` Jaroslav Kysela
2010-08-03 14:17   ` Pavel Hofman [this message]
2010-08-03 14:54     ` Jaroslav Kysela
2010-08-03 15:40       ` Pavel Hofman
2010-08-03 15:35 ` Raymond Yau

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=4C58250B.8000204@ivitera.com \
    --to=pavel.hofman@ivitera.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@perex.cz \
    /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.