openvortex-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openvortex-dev] aplay - How to use device 3 of card 0 ?


From: Raymond
Subject: Re: [Openvortex-dev] aplay - How to use device 3 of card 0 ?
Date: Mon, 07 Mar 2005 21:03:10 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.4.3) Gecko/20041005

>> #define VORTEX_PCM_TYPE(x) (x->name[40])
>>
>> 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;


May be just a bug of "aplay" ?

substream->pcm->name contain "adb" using "aplay -d hw:0,1 test.wav" or "aplay -d hw:0,3 test.wav"

# aplay --verbose -d hw:0,3 piano.wav
Playing WAVE 'piano.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
Plug PCM: Hardware PCM card 0 'au8830' device 0 subdevice 0

Its setup is:
stream       : PLAYBACK
access       : RW_INTERLEAVED
format       : S16_LE
subformat    : STD
channels     : 1
rate         : 44100
exact rate   : 44100 (44100/1)
msbits       : 16
buffer_size  : 22528
period_size  : 2048
period_time  : 46439
tick_time    : 10000
tstamp_mode  : NONE
period_step  : 1
sleep_min    : 0
avail_min    : 2048
xfer_align   : 2048
start_threshold  : 22528
stop_threshold   : 22528
silence_threshold: 0
silence_size : 0
boundary     : 1476395008

# aplay --verbose -d hw:0,1 piano.wav
Playing WAVE 'piano.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
Plug PCM: Hardware PCM card 0 'au8830' device 0 subdevice 0

Its setup is:
stream       : PLAYBACK
access       : RW_INTERLEAVED
format       : S16_LE
subformat    : STD
channels     : 1
rate         : 44100
exact rate   : 44100 (44100/1)
msbits       : 16
buffer_size  : 22528
period_size  : 2048
period_time  : 46439
tick_time    : 10000
tstamp_mode  : NONE
period_step  : 1
sleep_min    : 0
avail_min    : 2048
xfer_align   : 2048
start_threshold  : 22528
stop_threshold   : 22528
silence_threshold: 0
silence_size : 0
boundary     : 1476395008







reply via email to

[Prev in Thread] Current Thread [Next in Thread]