On Wed, Apr 12, 2023 at 12:37:56PM +0200, Takashi Iwai wrote:
On Wed, 12 Apr 2023 10:04:31 +0200, Oswald Buddenhagen wrote:
On Wed, Apr 12, 2023 at 09:54:54AM +0200, Takashi Iwai wrote:
I'm thinking whether we need to change anything in the kernel side for this at all. Can't it be changed rather in alsa-lib side instead?
it could, but it would be a lot uglier. user space would have to do a "man-in-the-middle attack" on the data, while in the kernel we can just slightly modify the consumer. this would be particularly obvious in the case of write() access.
But basically it'd be like fiddling sw_params temporarily for draining, I suppose?
err, right - i was still assuming manual padding. i actually tried temporarily changing the params (and pondered introducing "shadow" params) when i was doing the kernel patch, but that was a lot uglier than what i did in the end. i think it would be even worse in user space due to the need to support async operation.
regards