hid: jarvis: Use kmalloc for pcm buffers
authorAnkita Garg <ankitag@nvidia.com>
Wed, 12 Oct 2016 19:46:07 +0000 (12:46 -0700)
committermobile promotions <svcmobile_promotions@nvidia.com>
Thu, 27 Oct 2016 18:59:25 +0000 (11:59 -0700)
commit07b9abf3f46a7ab32aa187c1cf02d4831aae59bc
treef67b830b0baf9836b053195c735b152fd73c1373
parent4554d5ec5ec85c240ec04a8e71657a9698ada795
hid: jarvis: Use kmalloc for pcm buffers

For buffering voice data before mic open,
we moved buffer allocations to the
audio_dec function. However, audio_dec
could be called from interrupt context if
the controller is connected over USB
instead of BT. So the allocations inside
audio_dec cannot use vmalloc.

This change causes the audio buffers to
be pre-allocated at device probe time
and will be allocated until the device
is connected.

Bug 1825439

Change-Id: I26dab7f232a5e146168482e13d7d19301bf8a4c9
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/1235462
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
drivers/hid/hid-atv-jarvis.c