Re: [Alsa-devel] PCM format restrict dilema

2003-09-17 Thread Jaroslav Kysela
On Wed, 17 Sep 2003, James Courtier-Dutton wrote: > Jaroslav Kysela wrote: > > On Wed, 17 Sep 2003, Paul Davis wrote: > > > > > >>>So, the application does the following: - > >>>1) I want there to be 8 periods or less, with a minimum of 2. > >>>2) I want the buffer to be about 500ms long or less,

Re: [Alsa-devel] PCM format restrict dilema

2003-09-17 Thread James Courtier-Dutton
Jaroslav Kysela wrote: On Wed, 17 Sep 2003, Paul Davis wrote: So, the application does the following: - 1) I want there to be 8 periods or less, with a minimum of 2. 2) I want the buffer to be about 500ms long or less, with a minimum or 100ms 3) I want the period size to have a min value of x, an

Re: [Alsa-devel] PCM format restrict dilema

2003-09-17 Thread Jaroslav Kysela
On Wed, 17 Sep 2003, James Courtier-Dutton wrote: > The reason I think it might help this way, is because period_size and > buffer_size and number of periods are all closely linked, so we should > not have to set them one at a time, but set them as a group. Yes, but it's violation of the current

Re: [Alsa-devel] PCM format restrict dilema

2003-09-17 Thread Jaroslav Kysela
On Wed, 17 Sep 2003, Paul Davis wrote: > >So, the application does the following: - > >1) I want there to be 8 periods or less, with a minimum of 2. > >2) I want the buffer to be about 500ms long or less, with a minimum or 100ms > >3) I want the period size to have a min value of x, and a max valu

Re: [Alsa-devel] PCM format restrict dilema

2003-09-17 Thread Paul Davis
>So, the application does the following: - >1) I want there to be 8 periods or less, with a minimum of 2. >2) I want the buffer to be about 500ms long or less, with a minimum or 100ms >3) I want the period size to have a min value of x, and a max value or y. >4) Now calculate the actual sizes based

Re: [Alsa-devel] PCM format restrict dilema

2003-09-17 Thread James Courtier-Dutton
Jaroslav Kysela wrote: On Tue, 16 Sep 2003, James Courtier-Dutton wrote: I would expect to be able to use the "set_period_size_near" with direction +1, so if period_size=buffer_size/8 did not work, the alsa-lib would automatically select the next best one, even if it is buffer_size/2, but this se

Re: [Alsa-devel] PCM format restrict dilema

2003-09-17 Thread Jaroslav Kysela
On Tue, 16 Sep 2003, James Courtier-Dutton wrote: > I would expect to be able to use the "set_period_size_near" with > direction +1, so if period_size=buffer_size/8 did not work, the alsa-lib > would automatically select the next best one, even if it is > buffer_size/2, but this seems to fail as w

Re: [Alsa-devel] PCM format restrict dilema

2003-09-17 Thread Jaroslav Kysela
On Tue, 16 Sep 2003, James Courtier-Dutton wrote: > I help develop an application called xine. > We wish to use the function: - > dir=0; > err = snd_pcm_hw_params_set_buffer_time_near(this->audio_fd, params, > &buffer_time, &dir); > > We then try to set the period size to buffer_size / 8. > > I ha

Re: [Alsa-devel] PCM format restrict dilema

2003-09-16 Thread Paul Davis
>> why don't you set the sizes based on frame counts, not time? i suspect >> you're more likely to get better results. > >If the api for setting based on time it present, I would expect to be >able to use it. you can use it. but the thing is that you are probably requesting times in msecs, wherea

Re: [Alsa-devel] PCM format restrict dilema

2003-09-16 Thread James Courtier-Dutton
Paul Davis wrote: I want to try and aim at 8 periods per buffer. Common sense would tell me that one should be able to set the buffer size first, and then try to set the period size to buffer_size/8. But I why don't you set the sizes based on frame counts, not time? i suspect you're more likely

Re: [Alsa-devel] PCM format restrict dilema

2003-09-16 Thread Paul Davis
>I want to try and aim at 8 periods per buffer. >Common sense would tell me that one should be able to set the buffer >size first, and then try to set the period size to buffer_size/8. But I why don't you set the sizes based on frame counts, not time? i suspect you're more likely to get better r

Re: [Alsa-devel] PCM format restrict dilema

2003-09-16 Thread James Courtier-Dutton
Takashi Iwai wrote: At Tue, 16 Sep 2003 10:19:53 -0400, Manuel Jander wrote: Hello, I have the following dilema. The Aureal Vortex DMA engine supports upto 4 hardware pages, but they have to be frame aligned. The current driver also needs them to be of the same size. To archive this, i added the f

Re: [Alsa-devel] PCM format restrict dilema

2003-09-16 Thread Takashi Iwai
At Tue, 16 Sep 2003 10:19:53 -0400, Manuel Jander wrote: > > Hello, > > I have the following dilema. The Aureal Vortex DMA engine supports > upto 4 hardware pages, but they have to be frame aligned. The current > driver also needs them to be of the same size. To archive this, i added > the follow