* EWX and SPDIF, can you take a look at this?
@ 2003-06-30 16:49 Denis Sbragion
2003-07-02 10:50 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Denis Sbragion @ 2003-06-30 16:49 UTC (permalink / raw)
To: alsa-devel
Hello,
may be unrelated or not. I noticed that in aplay.c (0.9.4), at line 818,
the sample rate setting is obtained with:
rate = hwparams.rate;
err = snd_pcm_hw_params_set_rate_near(handle, params, &hwparams.rate, 0);
Is it correct to use a reference (&) to set the sample rate? Looking at the
hwparams structure and the snd_pcm_hw_params_set_rate_near definition I
think this should be just:
err = snd_pcm_hw_params_set_rate_near(handle, params, hwparams.rate, 0);
BruteFIR set the sample rate with:
/* It seems like it is best to set_rate_near instead of exact, have had
problems with ens1371 */
if ((err = snd_pcm_hw_params_set_rate_near(handle, params,
sample_rate, 0)) < 0)
{
...
No & here. I think either one or the other is a bug. This is the only
relevant difference I found between the BF initialization sequence and the
arecord one, so it may be related with the SPDIF problem with the EWX
considering the different behaviour between the two.
Thanks for the attention, and sorry if this is just a mistake in my
understanding on how ALSA works.
Bye,
--
Denis Sbragion
InfoTecna
Tel: +39 0362 805396, Fax: +39 0362 805404
URL: http://www.infotecna.it
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: EWX and SPDIF, can you take a look at this?
2003-06-30 16:49 EWX and SPDIF, can you take a look at this? Denis Sbragion
@ 2003-07-02 10:50 ` Takashi Iwai
2003-07-02 13:18 ` Denis Sbragion
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2003-07-02 10:50 UTC (permalink / raw)
To: Denis Sbragion; +Cc: alsa-devel
At Mon, 30 Jun 2003 18:49:31 +0200,
Denis Sbragion wrote:
>
> Hello,
>
> may be unrelated or not. I noticed that in aplay.c (0.9.4), at line 818,
> the sample rate setting is obtained with:
>
> rate = hwparams.rate;
> err = snd_pcm_hw_params_set_rate_near(handle, params, &hwparams.rate, 0);
>
> Is it correct to use a reference (&) to set the sample rate?
yes. the API was changed quite ago.
the old API returns the sample rate, while the new API replaces the
resultant rate on the given pointer.
ATM, as default still the old API is chosen unless you define
ALSA_PCM_NEW_HW_PARAMS_API. you shouldn't assume this in future,
though. it's recommended to write with the new API.
in the reference manual, only the new API is described, btw.
Takashi
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: EWX and SPDIF, can you take a look at this?
2003-07-02 10:50 ` Takashi Iwai
@ 2003-07-02 13:18 ` Denis Sbragion
0 siblings, 0 replies; 3+ messages in thread
From: Denis Sbragion @ 2003-07-02 13:18 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Hello Takashi,
At 12.50 02/07/2003 +0200, you wrote:
...
>yes. the API was changed quite ago.
ok, thanks. So the problem is somewere else. It's becoming quite a
challenging task...
Bye,
--
Denis Sbragion
InfoTecna
Tel: +39 0362 805396, Fax: +39 0362 805404
URL: http://www.infotecna.it
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-07-02 13:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-30 16:49 EWX and SPDIF, can you take a look at this? Denis Sbragion
2003-07-02 10:50 ` Takashi Iwai
2003-07-02 13:18 ` Denis Sbragion
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.