All of lore.kernel.org
 help / color / mirror / Atom feed
* Timer interface
@ 2011-07-29 15:05 Nenad Sljivic
  2011-08-02  5:53 ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Nenad Sljivic @ 2011-07-29 15:05 UTC (permalink / raw)
  To: alsa-devel

Hi,

I am extending my ALSA driver in order to support software mixing. Driver
currently supports both MMAP and RW access modes. However, I am still not
able to use dmix since it requires timer interface to be implemented.
My hardware does not generate interrupts at the period boundary but issues
timer interrupts at a fixed timer rate. 
 
Could you please point me to the document or sample driver that can help me
to fully understand timer interface concept (especially for High frequency
timer interrupts)?

Thanks,
Nenad

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

* Re: Timer interface
  2011-07-29 15:05 Timer interface Nenad Sljivic
@ 2011-08-02  5:53 ` Takashi Iwai
  2011-08-02 10:33   ` Nenad Sljivic
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2011-08-02  5:53 UTC (permalink / raw)
  To: Nenad Sljivic; +Cc: alsa-devel

At Fri, 29 Jul 2011 17:05:23 +0200,
Nenad Sljivic wrote:
> 
> Hi,
> 
> I am extending my ALSA driver in order to support software mixing. Driver
> currently supports both MMAP and RW access modes. However, I am still not
> able to use dmix since it requires timer interface to be implemented.
> My hardware does not generate interrupts at the period boundary but issues
> timer interrupts at a fixed timer rate. 

The timer interface is always present with ALSA (kernel) PCM
interface, thus normally you don't have to implement it.
Or are you trying to implement without the normal kernel driver but
with alsa-lib ioplug or such?


Takashi

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

* Re: Timer interface
  2011-08-02  5:53 ` Takashi Iwai
@ 2011-08-02 10:33   ` Nenad Sljivic
  2011-08-02 10:36     ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Nenad Sljivic @ 2011-08-02 10:33 UTC (permalink / raw)
  To: 'Takashi Iwai'; +Cc: alsa-devel

Takashi,

Thanks for your help. My timer device has not been created at the correct
path (/dev/snd), so I thought it was missing and that I need to implement
it.  

-----Original Message-----
From: Takashi Iwai [mailto:tiwai@suse.de] 
Sent: 02 August 2011 07:54
To: Nenad Sljivic
Cc: alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] Timer interface

At Fri, 29 Jul 2011 17:05:23 +0200,
Nenad Sljivic wrote:
> 
> Hi,
> 
> I am extending my ALSA driver in order to support software mixing. Driver
> currently supports both MMAP and RW access modes. However, I am still not
> able to use dmix since it requires timer interface to be implemented.
> My hardware does not generate interrupts at the period boundary but issues
> timer interrupts at a fixed timer rate. 

The timer interface is always present with ALSA (kernel) PCM
interface, thus normally you don't have to implement it.
Or are you trying to implement without the normal kernel driver but
with alsa-lib ioplug or such?


Takashi

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

* Re: Timer interface
  2011-08-02 10:33   ` Nenad Sljivic
@ 2011-08-02 10:36     ` Takashi Iwai
  2011-08-02 10:43       ` Nenad Sljivic
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2011-08-02 10:36 UTC (permalink / raw)
  To: Nenad Sljivic; +Cc: alsa-devel

At Tue, 2 Aug 2011 12:33:32 +0200,
Nenad Sljivic wrote:
> 
> Takashi,
> 
> Thanks for your help. My timer device has not been created at the correct
> path (/dev/snd), so I thought it was missing and that I need to implement
> it.  

No, you don't have to implement the timer in your driver explicitly.
A slave-timer instance is created for each PCM stream (see
sound/core/pcm_timer.c), and dmix uses this.
Look at /proc/asound/timers.  On my machine, it shows like:

G0: system timer : 4000.000us (10000000 ticks)
P0-0-0: PCM playback 0-0-0 : SLAVE
P0-0-1: PCM capture 0-0-1 : SLAVE
P0-2-1: PCM capture 0-2-1 : SLAVE
P0-2-3: PCM capture 0-2-3 : SLAVE
P1-3-0: PCM playback 1-3-0 : SLAV


Takashi

> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de] 
> Sent: 02 August 2011 07:54
> To: Nenad Sljivic
> Cc: alsa-devel@alsa-project.org
> Subject: Re: [alsa-devel] Timer interface
> 
> At Fri, 29 Jul 2011 17:05:23 +0200,
> Nenad Sljivic wrote:
> > 
> > Hi,
> > 
> > I am extending my ALSA driver in order to support software mixing. Driver
> > currently supports both MMAP and RW access modes. However, I am still not
> > able to use dmix since it requires timer interface to be implemented.
> > My hardware does not generate interrupts at the period boundary but issues
> > timer interrupts at a fixed timer rate. 
> 
> The timer interface is always present with ALSA (kernel) PCM
> interface, thus normally you don't have to implement it.
> Or are you trying to implement without the normal kernel driver but
> with alsa-lib ioplug or such?
> 
> 
> Takashi
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

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

* Re: Timer interface
  2011-08-02 10:36     ` Takashi Iwai
@ 2011-08-02 10:43       ` Nenad Sljivic
  0 siblings, 0 replies; 5+ messages in thread
From: Nenad Sljivic @ 2011-08-02 10:43 UTC (permalink / raw)
  To: 'Takashi Iwai'; +Cc: alsa-devel

Hi,

I got it. I've fixed the problem with the node creation and dmix works fine
now. 
Thanks

-----Original Message-----
From: Takashi Iwai [mailto:tiwai@suse.de] 
Sent: 02 August 2011 12:37
To: Nenad Sljivic
Cc: alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] Timer interface

At Tue, 2 Aug 2011 12:33:32 +0200,
Nenad Sljivic wrote:
> 
> Takashi,
> 
> Thanks for your help. My timer device has not been created at the correct
> path (/dev/snd), so I thought it was missing and that I need to implement
> it.  

No, you don't have to implement the timer in your driver explicitly.
A slave-timer instance is created for each PCM stream (see
sound/core/pcm_timer.c), and dmix uses this.
Look at /proc/asound/timers.  On my machine, it shows like:

G0: system timer : 4000.000us (10000000 ticks)
P0-0-0: PCM playback 0-0-0 : SLAVE
P0-0-1: PCM capture 0-0-1 : SLAVE
P0-2-1: PCM capture 0-2-1 : SLAVE
P0-2-3: PCM capture 0-2-3 : SLAVE
P1-3-0: PCM playback 1-3-0 : SLAV


Takashi

> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de] 
> Sent: 02 August 2011 07:54
> To: Nenad Sljivic
> Cc: alsa-devel@alsa-project.org
> Subject: Re: [alsa-devel] Timer interface
> 
> At Fri, 29 Jul 2011 17:05:23 +0200,
> Nenad Sljivic wrote:
> > 
> > Hi,
> > 
> > I am extending my ALSA driver in order to support software mixing.
Driver
> > currently supports both MMAP and RW access modes. However, I am still
not
> > able to use dmix since it requires timer interface to be implemented.
> > My hardware does not generate interrupts at the period boundary but
issues
> > timer interrupts at a fixed timer rate. 
> 
> The timer interface is always present with ALSA (kernel) PCM
> interface, thus normally you don't have to implement it.
> Or are you trying to implement without the normal kernel driver but
> with alsa-lib ioplug or such?
> 
> 
> Takashi
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

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

end of thread, other threads:[~2011-08-02 10:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-29 15:05 Timer interface Nenad Sljivic
2011-08-02  5:53 ` Takashi Iwai
2011-08-02 10:33   ` Nenad Sljivic
2011-08-02 10:36     ` Takashi Iwai
2011-08-02 10:43       ` Nenad Sljivic

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.