[alsa-devel] mono/stereo translation & number of frames per period

Paul Stone metabagel at icloud.com
Fri Mar 31 20:42:47 CEST 2017


Hi,

I've tried setting the runtime->hw.buffer_bytes_max in the prepare() callback, but that doesn't seem to have any effect. The copy callback continues to exceed the boundary of my monaural buffer.

I've tried setting up rules based on the number of channels, but the channels interval seems to have no bearing on the actual number of channels for the substream. According to the documentation written by Takashi Iwai, it should be possible to modify the hw parameters based on the number of channels for the substream. In his example, he uses the channel minimum from the interval. I don't understand how an interval applies to a substream. I would think that an open substream would have a fixed number of channels. When I run speakertest with a single channel, I would think that is not an interval, but rather a fixed number of channels equal to '1'. So, I don't understand the purpose of accepting an interval for channels in a rules function which is intended to make changes based on the number of channels for the substream.

Here is the interval structure:

struct snd_interval {
   unsigned int min, max;
   unsigned int openmin:1,
   openmax:1,
   integer:1,
   empty:1;
};

None of those fields provided to my rules function seem to contain the correct number of channels for the current substream.

I am using alsa-lib-1.0.27.2-r1, which is fairly old.

Best Regards,
Paul Stone

http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


More information about the Alsa-devel mailing list