[alsa-devel] Accessing already probed snd_card in kernel space

Koul, Vinod vinod.koul at intel.com
Thu Apr 28 07:55:11 CEST 2011


On Fri, 2011-04-15 at 13:57 +0530, Shreshtha wrote:
> On Fri, Apr 15, 2011 at 1:27 PM, Clemens Ladisch <clemens at ladisch.de> wrote:
> 
> > Shreshtha wrote:
> > > Vibrator hardware is connected to D-Class amplifier of Audio block.
> >
> > Does this mean that you have to generate the vibration waveform as
> > sound data and write it to the sound device?  This would be rather
> > unwieldy in kernel space.  (Just accessing a mixer control would be
> > possible.)
> >
> > [Shreshtha] Yes that is also a use case. But I require just to enable the
> vibrator for x msec and turn it off.
> This is for haptic feedback.
> Please suggest how to "just accessing a mixer control" from kernel?
Sorry for late reply...been on a vacation

I have implemented a similar mechanism, all the vibrator controls are
exposed as mixer elements by the codec driver.
To turn on just treat the vibrator as input and connect them in
userspace to the output, that will power on this path and you cna get x
ms vibrations

HTH
-- 
~Vinod



More information about the Alsa-devel mailing list