[alsa-devel] [PATCH 35/50] media: usb: cx231xx: spin_lock in complete() cleanup
Ming Lei
ming.lei at canonical.com
Sat Jul 27 11:34:07 CEST 2013
On Fri, Jul 26, 2013 at 10:28 PM, Hans Verkuil <hverkuil at xs4all.nl> wrote:
>
>
> On 07/11/2013 11:05 AM, Ming Lei wrote:
>> Complete() will be run with interrupt enabled, so change to
>> spin_lock_irqsave().
>>
>> Cc: Mauro Carvalho Chehab <mchehab at redhat.com>
>> Cc: Hans Verkuil <hans.verkuil at cisco.com>
>> Cc: linux-media at vger.kernel.org
>> Signed-off-by: Ming Lei <ming.lei at canonical.com>
>> ---
>> drivers/media/usb/cx231xx/cx231xx-audio.c | 6 ++++++
>> drivers/media/usb/cx231xx/cx231xx-core.c | 10 ++++++----
>> drivers/media/usb/cx231xx/cx231xx-vbi.c | 5 +++--
>> 3 files changed, 15 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/media/usb/cx231xx/cx231xx-audio.c b/drivers/media/usb/cx231xx/cx231xx-audio.c
>> index 81a1d97..58c1b5c 100644
>> --- a/drivers/media/usb/cx231xx/cx231xx-audio.c
>> +++ b/drivers/media/usb/cx231xx/cx231xx-audio.c
>> @@ -136,6 +136,7 @@ static void cx231xx_audio_isocirq(struct urb *urb)
>> stride = runtime->frame_bits >> 3;
>>
>> for (i = 0; i < urb->number_of_packets; i++) {
>> + unsigned long flags;
>> int length = urb->iso_frame_desc[i].actual_length /
>> stride;
>> cp = (unsigned char *)urb->transfer_buffer +
>> @@ -158,6 +159,7 @@ static void cx231xx_audio_isocirq(struct urb *urb)
>> length * stride);
>> }
>>
>> + local_irq_save(flags);
>> snd_pcm_stream_lock(substream);
>
> Can't you use snd_pcm_stream_lock_irqsave here?
Sure, that is already in my mind, :-)
> Ditto for the other media drivers where this happens: em28xx and tlg2300.
Yes.
>
> I've reviewed the media driver changes and they look OK to me, so if
> my comment above is fixed, then I can merge them for 3.12. Or are these
> changes required for 3.11?
These are for 3.12.
I will send out v2 next week, and thanks for your review.
Thanks,
--
Ming Lei
More information about the Alsa-devel
mailing list