2014-9-13 下午6:43 於 "Alexander E. Patrakov" patrakov@gmail.com 寫道:
13.09.2014 14:57, Raymond Yau wrote:
On my desktop PC, on snd-hda-intel with analog outputs for S16LE
stereo, the granularity is 32 bytes (= 8 samples), and I get the
pointer
granularity of 64 bytes (=16 samples) over HDMI. The minimum period
size
is 32 samples in both cases.
Do you mean hda-Intel does not support arbritray period size when you say the granularity is 32 bytes ?
However the granularity of the emulated hda sound card inside any VM depend on the vm and the backend audio system and sound card
The precise meaning is defined here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2014-May/076475.html
Do you mean the different hda controllers may have different granularity
?
Yes. My two hda controllers have different granularity.
Do your two hda controllers have different Fifo size ?
If you mean the result of snd_pcm_hw_params_get_fifo_size(), then both
cards return 0. I call this function after snd_pcm_hw_params(), as recommended by the documentation.
Do your hda controllers OSDnFIFOS register match the granularity ?
3.3.40 Offset 90: {IOB}SDnFIFOS – Input/Output/Bidirectional Stream Descriptor n FIFO Size
Length: 2 bytes
Table 39. Stream Descriptor n FIFO Size Bit Type Reset Description 15:0 RO Imp.Dep
FIFO Size (FIFOS): Indicates the maximum number of bytes that could be fetched by the controller at one time. This is the maximum number of bytes that may have been DMA‟d into memory but not yet transmitted on the link, and is also the maximum possible value that the LPIB count will increase by at one time. This number may be static to indicate a static buffer size, or may change after the data format has been programmed if the controller is able to vary its FIFO size based on the stream format. If it is able to change value after the data format has been programmed, the value update must happen immediately before the next read of the FIFOS register, and remain static until the next programming of data format.