[alsa-devel] Question about ASOC codec drivers

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Jan 18 20:19:23 CET 2011


On Tue, Jan 18, 2011 at 05:35:22PM +0000, Neil Jones wrote:

> tansen_input_select[] array of strings which only has 3 entries, so it
> blows up (e->max = 7??).

This...

> also shouldn't the strcpy by a strncpy as we are copying to a fixed
> 64byte buffer ?

There's rather a lot of strcpy() calls in the kernel; perhaps you could
be more specific?  Ideally if you think there's a change that should be
made please post a patch.

> static const struct soc_enum tansen_ip_enum =
> SOC_ENUM_SINGLE(TANSEN_TM_IP_TOP2, 4, 0x7, tansen_input_select);

...is exactly what you told the driver to do.  You've told the core
there are seven items in the enumeration so it's expecting an array of
seven strings.


More information about the Alsa-devel mailing list