All of lore.kernel.org
 help / color / mirror / Atom feed
* question about sound/oss/vidc.c
@ 2010-03-16 22:02 Julia Lawall
  2010-03-17  7:25 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2010-03-16 22:02 UTC (permalink / raw)
  To: perex, tiwai, alsa-devel

In sound/oss/vidc.c, the function vidc_audio_trigger contains thefollowing 
code:

        struct audio_operations *adev = audio_devs[dev];

        if (enable_bits & PCM_ENABLE_OUTPUT) {
                if (!(adev->flags & DMA_ACTIVE)) {
                        unsigned long flags;

                        local_irq_save(flags);

                        /* prevent recusion */
                        adev->flags |= DMA_ACTIVE;

			...
		}
	}

I wonder if the use of DMA_ACTIVE is correct?  This constant is defined 
inthe file sound/oss/dev_table.h within the definition of the structure 
dma_buffparms.  But here it is being used with the structure 
audio_operations.  The definition of audio_operations also contains the 
definitions of some constants.  Indeed, one of them, DMA_DUPLEX has the 
same value as DMA_ACTIVE.

thanks,
julia

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: question about sound/oss/vidc.c
  2010-03-16 22:02 question about sound/oss/vidc.c Julia Lawall
@ 2010-03-17  7:25 ` Takashi Iwai
  2010-03-20 17:42   ` Russell King
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2010-03-17  7:25 UTC (permalink / raw)
  To: Julia Lawall; +Cc: alsa-devel, Russell King

[Cc'ed to Russell, the driver author]

At Tue, 16 Mar 2010 23:02:54 +0100 (CET),
Julia Lawall wrote:
> 
> In sound/oss/vidc.c, the function vidc_audio_trigger contains thefollowing 
> code:
> 
>         struct audio_operations *adev = audio_devs[dev];
> 
>         if (enable_bits & PCM_ENABLE_OUTPUT) {
>                 if (!(adev->flags & DMA_ACTIVE)) {
>                         unsigned long flags;
> 
>                         local_irq_save(flags);
> 
>                         /* prevent recusion */
>                         adev->flags |= DMA_ACTIVE;
> 
> 			...
> 		}
> 	}
> 
> I wonder if the use of DMA_ACTIVE is correct?  This constant is defined 
> inthe file sound/oss/dev_table.h within the definition of the structure 
> dma_buffparms.  But here it is being used with the structure 
> audio_operations.  The definition of audio_operations also contains the 
> definitions of some constants.  Indeed, one of them, DMA_DUPLEX has the 
> same value as DMA_ACTIVE.

I guess these should be adev->dma_out->flags instead.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: question about sound/oss/vidc.c
  2010-03-17  7:25 ` Takashi Iwai
@ 2010-03-20 17:42   ` Russell King
  2010-03-20 18:00     ` Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King @ 2010-03-20 17:42 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Julia Lawall

On Wed, Mar 17, 2010 at 08:25:52AM +0100, Takashi Iwai wrote:
> I guess these should be adev->dma_out->flags instead.

Yes, I think so too.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: question about sound/oss/vidc.c
  2010-03-20 17:42   ` Russell King
@ 2010-03-20 18:00     ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2010-03-20 18:00 UTC (permalink / raw)
  To: Russell King; +Cc: Takashi Iwai, alsa-devel

On Sat, 20 Mar 2010, Russell King wrote:

> On Wed, Mar 17, 2010 at 08:25:52AM +0100, Takashi Iwai wrote:
> > I guess these should be adev->dma_out->flags instead.
> 
> Yes, I think so too.

Thanks. I sent a patch.

julia

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-20 18:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-16 22:02 question about sound/oss/vidc.c Julia Lawall
2010-03-17  7:25 ` Takashi Iwai
2010-03-20 17:42   ` Russell King
2010-03-20 18:00     ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.