Re: [PATCH 7/8] ALSA: pcm: Add card sync_irq field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 19 Nov 2019 00:47:53 +0100,
Ranjani Sridharan wrote:
> 
> On Mon, 2019-11-18 at 21:40 +0100, Takashi Iwai wrote:
> > On Mon, 18 Nov 2019 20:55:19 +0100,
> > Sridharan, Ranjani wrote:
> > > 
> > >     > Thanks for the clarification, Takashi. But just wondering how
> > > would one
> > >     pass
> > >     > on the sync_irq when the snd_card is created? Typically in
> > > the case of
> > >     the
> > >     > Intel platforms, the card->dev points to the platform device
> > > for the
> > >     machine
> > >     > driver that registers the card and the PCI device is the
> > > parent of the
> > >     machine
> > >     > drv platform device. 
> > >    
> > >     It's completely up to the driver implementation :)
> > >     You can implement the own sync_stop ops if that's easier, too.
> > > 
> > > I think this would make sense in the case of the SOF driver and
> > > we'd probably
> > > need to just call synchronize_irq() in the sync_stop() operation.
> > > With this
> > > change, we can probably remove the workaround we have to address
> > > the issue we
> > > were facing during snd_pcm_period_elapsed(). 
> > > 
> > > I can give this a try. We might need to run some stress tests to
> > > make sure it
> > > doesn't break anything. 
> > 
> > If this helps for SOF, it'd be great.  I have converted only non-ASoC
> > drivers regarding the sync-stop stuff, so it won't conflict my
> > upcoming changes :)
> > 
> Hi Takashi,
> 
> I just realized that In the SOF driver, we only set the component
> driver ops. The pcm ops are set when creating the new pcm. So, should I
> also add the sync_stop op in the component driver and set the pcm
> sync_stop op to point to the component sync_stop op? Just wanted to
> confirm if I am on the right track.

Yes, I didn't touch this yet, but that's the way to go I suppose.
One caveat is that this ops is optional and needs NULL as default,
hence you'd need to set only when defined, like copy_user, page or
mmap ops, at least.


thanks,

Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux