[alsa-devel] compress: adding support for hardware dependent params

Banajit Goswami bgoswami at codeaurora.org
Sun Feb 2 03:50:36 CET 2014


 We have a requirement, where we need to set a number of hardware specific
parameters for compressed offload use-cases, before starting a stream. As
these parameters need to be set once for the entire session, we would
like to explore the best way to set these additional parameters somewhere
before calling trigger() function.
 Below are few of the proposed solutions that we could think of at this
point for getting this done-

1. Adding new IOCTL call: Add a new ioctl control in compress-offload.c
file to handle hardware specific parameters setting. This new ioctl
control will call into soc-compress.c and eventually call into platform
driver ioctl to set those hardware specific parameters. In this case, we
will add a new structure, let's say "snd_compr_hw_ctrl_params", with the
same fields as "snd_compr_metadata" struct.

2. Adding a function hw_dependant_hw_params(), which will be called after
hw_params() and before prepare() function. The new function will
eventually call into the platform driver to get the hardware specific
parameters set. Once implemented, this would look something like-

3. Add a function "hw_dependant_hw_params()", as _part_ of the hw_params()
function. This new function will be called after the (existing) generic
parameters are set. So once implemented, the proposed function calls would
look like-
  hw_params() {

We would like to get feedback on these proposed solutions and get a
discussion going to see how best these requirements can be fitted in the
current Compressed ALSA framework (for mainlining).

Thanks and Regards,
Banajit Goswami

The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

More information about the Alsa-devel mailing list