From: mateen <abdulmateen.shaikh@gmail.com>
To: alsa-devel@alsa-project.org
Subject: Issue with Dmix
Date: Mon, 25 Feb 2013 11:38:58 +0530 [thread overview]
Message-ID: <CADryByFhCKh0VjkCpeqj=y1XAWxqAL+eFu04AMerncgenDo38Q@mail.gmail.com> (raw)
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
next reply other threads:[~2013-02-25 6:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-25 6:08 mateen [this message]
2013-03-04 10:25 ` Issue with Dmix mateen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADryByFhCKh0VjkCpeqj=y1XAWxqAL+eFu04AMerncgenDo38Q@mail.gmail.com' \
--to=abdulmateen.shaikh@gmail.com \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).