[alsa-devel] Supporting an unusual device

Andrew Murray amurray at mpcdata.com
Tue Jul 26 18:45:44 CEST 2011


Hello,

I'm writing support for a slightly unusual device (which I intend to
share later) and would like feedback on the best approach to take. The
device is for a SOC which has two identical I2C connected codecs. Most
codec drivers contain a snd_soc_dai structure - but as this contains
instance specific data it would be necessary instead to produce
(kmalloc) such structures for each instance (to ensure that both
codecs can be treated and addressed independently). I.e. it seems that
some codec drivers have been written with the assumption that there
will only be one present on a system at any time. My view would be to
implement such functionality (kmalloc'ing snd_soc_dai's) in one of the
various platform specific directories as appropriate - e.g. atmel,
blackfin, davinci, etc. Is this the best way forward? Are there any
examples I've missed which do support multiple instances of the same
codec?

Also - is it recommended to expose these two codecs to the outside
world as two snd_soc_card devices - or a single card with multiple
dai_links?

Thanks,

Andrew Murray


More information about the Alsa-devel mailing list