-
Chen Liangjun authored
For ASRC memory to memory transfer, user would send driver input buffer and driver would copy converted output buffer into user's buffer. However, ASRC can't promise the ratio of output buffer size/input buffer size being equal to output sample rate/input sample rate.e.g, for convert from 8k to 48k and 1000 bytes input buffer size, ASRC may pop out 5999 bytes or 6001 bytes. If driver copy all 6001 bytes into user's buffer, kernel dump may happens cause of accessing unexisted buffer. In this patch, if ASRC output buffer size is larger than user's buffer size, discard exact part. Signed-off-by: Chen Liangjun <b36089@freescale.com>
d85c0551