* Issue with Dmix
@ 2013-02-25 6:08 mateen
2013-03-04 10:25 ` mateen
0 siblings, 1 reply; 2+ messages in thread
From: mateen @ 2013-02-25 6:08 UTC (permalink / raw)
To: alsa-devel
HI
We have enabled DMIX plugin for sample rate conversion and mixing of 2 pcm
streams in our alsa package (Alsa lib 1.0.22 and alsa driver 1.0.22.1) to
48K output Sample rate.However we are seeing a noise issue with 44100
Sample rate input streams or Unsigned Stereo 48K stream.
This is how our current design is:
We call snd_pcm_lib_malloc_page() in which alsa driver internally allocates
a dma buffer and map it when Dmix is invoked.
We currently reads from that mmaped buffer to our hardware buffer inside a
transfer_ack_begin() function which is called from snd_pcm_period_elapsed().
However we are getting a problem in understanding how do we know how much
data has been written by dmix lib in mapped buffer? As we see no ioctl or
corresponding hardware function call where dmix may pass information on
Size of data being written to our driver.
We do see appl_ptr and hw_ptr in runtime->mmap->control and status struct.
Out architecture doesn’t support defining and mapping of these status and
control structure at hardware level.Thus Dmix lib allocates them and copy
them to runtime substream via ioctl. As far as I could understand both
appl_ptr and hw_ptr are initialised to 0 and then appl_ptr is the one
adjusted by lib after every write. Should we tap this value to update
hw_ptr value in status information? Will difference of hw_ptr and appl_ptr
will let us know amount of frames been written?
Can anyone please help us to understand criteria and concept of data copy
from intermediate to hardware buffer?
Any information on this would be of immense help.
Regards,
Shaikh Mateen
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Issue with Dmix
2013-02-25 6:08 Issue with Dmix mateen
@ 2013-03-04 10:25 ` mateen
0 siblings, 0 replies; 2+ messages in thread
From: mateen @ 2013-03-04 10:25 UTC (permalink / raw)
To: alsa-devel
Hi,
Can anybody please guide us in this situation.
On Mon, Feb 25, 2013 at 11:38 AM, mateen <abdulmateen.shaikh@gmail.com>wrote:
> HI
>
>
>
> We have enabled DMIX plugin for sample rate conversion and mixing of 2 pcm
> streams in our alsa package (Alsa lib 1.0.22 and alsa driver 1.0.22.1) to
> 48K output Sample rate.However we are seeing a noise issue with 44100
> Sample rate input streams or Unsigned Stereo 48K stream.
>
>
>
> This is how our current design is:
>
> We call snd_pcm_lib_malloc_page() in which alsa driver internally
> allocates a dma buffer and map it when Dmix is invoked.
>
> We currently reads from that mmaped buffer to our hardware buffer inside a
> transfer_ack_begin() function which is called from snd_pcm_period_elapsed().
>
> However we are getting a problem in understanding how do we know how much
> data has been written by dmix lib in mapped buffer? As we see no ioctl or
> corresponding hardware function call where dmix may pass information on
> Size of data being written to our driver.
>
>
>
> We do see appl_ptr and hw_ptr in runtime->mmap->control and status struct.
> Out architecture doesn’t support defining and mapping of these status and
> control structure at hardware level.Thus Dmix lib allocates them and copy
> them to runtime substream via ioctl. As far as I could understand both
> appl_ptr and hw_ptr are initialised to 0 and then appl_ptr is the one
> adjusted by lib after every write. Should we tap this value to update
> hw_ptr value in status information? Will difference of hw_ptr and appl_ptr
> will let us know amount of frames been written?
>
> Can anyone please help us to understand criteria and concept of data copy
> from intermediate to hardware buffer?
>
> Any information on this would be of immense help.
>
>
> Regards,
> Shaikh Mateen
>
--
Regards,
Shaikh Mateen S.
09423350444
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-04 10:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-25 6:08 Issue with Dmix mateen
2013-03-04 10:25 ` mateen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).