* Re: [Openvortex-dev] aplay - How to use device 3 of card 0 ?
@ 2005-03-07 7:54 Raymond
2005-03-07 12:22 ` Manuel Jander
0 siblings, 1 reply; 3+ messages in thread
From: Raymond @ 2005-03-07 7:54 UTC (permalink / raw)
To: openvortex-dev; +Cc: alsa-devel
>> 2) How did you perform your "WT DMA" test ?
>Using:
>aplay -d hw:0,1 test.wav
>The result for me was that aplay did newer finish, because data was
>never being transfered. After some time it timed out with an error.
http://savannah.nongnu.org/cgi-bin/viewcvs/openvortex/alsa/pci/au88x0/au88x0_pcm.c.diff?r1=1.9&r2=1.10
#define VORTEX_PCM_TYPE(x) (x->name[40])
http://cvs.sourceforge.net/viewcvs.py/alsa/alsa-kernel/pci/au88x0/au88x0_pcm.c?rev=1.6&view=markup
snd_vortex_new_pcm()
{
...
strcpy(pcm->name, vortex_pcm_name[idx]);
chip->pcm[idx] = pcm;
// This is an evil hack, but it saves a lot of duplicated code.
VORTEX_PCM_TYPE(pcm) = idx;
pcm->private_data = chip;
...
}
Added debug statement in snd_vortex_pcm_open()
/* Avoid PAGE_SIZE boundary to fall inside of a period. */
if ((err =
snd_pcm_hw_constraint_pow2(runtime, 0,
SNDRV_PCM_HW_PARAM_PERIOD_BYTES)) < 0)
return err;
+ printk(KERN_INFO "vortex_pcm_open()
%d\n",VORTEX_PCM_TYPE(substream->pcm));
if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) {
Don't know why VORTEX_PCM_TYPE(substream->pcm) is always zero when using
"aplay -d hw:0,1 test.wav" or "aplay -d hw:0,3 test.wav"
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [Openvortex-dev] aplay - How to use device 3 of card 0 ?
2005-03-07 7:54 [Openvortex-dev] aplay - How to use device 3 of card 0 ? Raymond
@ 2005-03-07 12:22 ` Manuel Jander
0 siblings, 0 replies; 3+ messages in thread
From: Manuel Jander @ 2005-03-07 12:22 UTC (permalink / raw)
To: Raymond, openvortex-dev, alsa-devel
Hi Raymond,
On Mon, 2005-03-07 at 15:54 +0800, Raymond wrote:
> >> 2) How did you perform your "WT DMA" test ?
>
> >Using:
> >aplay -d hw:0,1 test.wav
>
> >The result for me was that aplay did newer finish, because data was
> >never being transfered. After some time it timed out with an error.
>
> http://savannah.nongnu.org/cgi-bin/viewcvs/openvortex/alsa/pci/au88x0/au88x0_pcm.c.diff?r1=1.9&r2=1.10
>
> #define VORTEX_PCM_TYPE(x) (x->name[40])
>
> http://cvs.sourceforge.net/viewcvs.py/alsa/alsa-kernel/pci/au88x0/au88x0_pcm.c?rev=1.6&view=markup
>
> snd_vortex_new_pcm()
> {
> ...
> strcpy(pcm->name, vortex_pcm_name[idx]);
> chip->pcm[idx] = pcm;
> // This is an evil hack, but it saves a lot of duplicated code.
> VORTEX_PCM_TYPE(pcm) = idx;
> pcm->private_data = chip;
> ...
> }
I'm the author of that ugly thing :)
> Added debug statement in snd_vortex_pcm_open()
>
>
> /* Avoid PAGE_SIZE boundary to fall inside of a period. */
> if ((err =
> snd_pcm_hw_constraint_pow2(runtime, 0,
> SNDRV_PCM_HW_PARAM_PERIOD_BYTES)) < 0)
> return err;
> + printk(KERN_INFO "vortex_pcm_open()
> %d\n",VORTEX_PCM_TYPE(substream->pcm));
>
> if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) {
>
>
> Don't know why VORTEX_PCM_TYPE(substream->pcm) is always zero when using
> "aplay -d hw:0,1 test.wav" or "aplay -d hw:0,3 test.wav"
Hmm, if we are lucky, you are the one, who finally found out why the WT
engine does not work. The thing to be done, is to change the mechanism
in which we differentiate between WT and ADB channels. I just used
char[40] of the name string, but thats not a very safe thing. One thing
would be using a intermediate struct for substream->pcm->private_data,
for example:
typedef struct _au_pcm {
int type;
chip_t *chip; /* type is probably wrong here. */
} au_pcm;
Best Regards
--
Manuel Jander
Electronic Engineer
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [Openvortex-dev] aplay - How to use device 3 of card 0 ?
2005-03-09 9:17 Raymond
@ 2005-03-09 9:14 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2005-03-09 9:14 UTC (permalink / raw)
To: Raymond; +Cc: openvortex-dev, alsa-devel
At Wed, 09 Mar 2005 17:17:41 +0800,
Raymond wrote:
>
> > > 2) How did you perform your "WT DMA" test ?
>
> > Using:
> > aplay -d hw:0,1 test.wav
>
> > The result for me was that aplay did newer finish, because data was
> > never being transfered. After some time it timed out with an error.
>
> The correct syntax should be "aplay -D hw:0,3 piano.wav"
Ah damn, of course it must be -D :)
> ioctl(4, 0x400c4150, 0xbff092b0) = -1 EIO (Input/output error)
> write(2, "aplay: pcm_write:1146: ", 23aplay: pcm_write:1146: ) = 23
> write(2, "write error: Input/output error", 31write error: Input/output
> error) = 31
> write(2, "\n", 1
> ) = 1
> exit_group(1) = ?
>
>
> I can only hear "hmm" sound from the speakers until the program abort.
> 1) Do strace indicate "data was never being transfered" ?
I don't know whether it's "never", but at least the transfer was
aborted after a certain amount of write. Usually -EIO means that DMA
isn't working properly.
If you compile with CONFIG_SND_DEBUG, you might see the message
"playback drain error (DMA or IRQ trouble?)" from kernel.
Takashi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-09 9:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-07 7:54 [Openvortex-dev] aplay - How to use device 3 of card 0 ? Raymond
2005-03-07 12:22 ` Manuel Jander
-- strict thread matches above, loose matches on Subject: below --
2005-03-09 9:17 Raymond
2005-03-09 9:14 ` Takashi Iwai
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.