All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: `/ET!-i1S!-i <yethish7@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Copy ALSA buffer to the buffer allocated in my driver.
Date: Mon, 01 Aug 2011 11:28:08 +0200	[thread overview]
Message-ID: <4E3671A8.1090209@ladisch.de> (raw)
In-Reply-To: <CAB+ez9tA3CGxwb=1pge2RB+P97rUzDCNx36kJ1VLLDpFGyRdTg@mail.gmail.com>

`/ET!-i1S!-i wrote:
> 1. I guess pulse audio inturn calls Alsa and  i want to write a Alsa driver.

But the sound cards on the networked PCs already have drivers.

> The problem i am facing is receiving Alsa buffer to my buffer

Your driver's buffer _is_ the ALSA buffer.

> and updating the buffer position to middle layer.

The hardware position is returned by the pointer callback.
The software position should be of no concern to the driver.

> 2. Is it substream->runtime->dma_area or substream->dma_buffer.area holds
> the audio data? What is the difference between them?

These fields are controlled by your driver, although typically they are
set by ALSA helper functions.

substream->dma_buffer is the preallocated buffer; if your driver doesn't
do preallocation, it is not set.  The actual buffer, if it exists and is
accessible by the CPU from kernel space, is in substream->runtime->dma_area.


Regards,
Clemens

       reply	other threads:[~2011-08-01  9:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAB+ez9vVkGiefO8oQhyUZ+fqRn-vphpZPztu+S=iWsnk73nJLw@mail.gmail.com>
     [not found] ` <CAB+ez9tumzPRXcweBWW6EBEM6ySduG36Aue8a_p8_cmubSwopg@mail.gmail.com>
     [not found]   ` <CAB+ez9tA3CGxwb=1pge2RB+P97rUzDCNx36kJ1VLLDpFGyRdTg@mail.gmail.com>
2011-08-01  9:28     ` Clemens Ladisch [this message]
     [not found] <CAB+ez9uo=4ruqp0yXXJ9Ny=GRXVP6ALYYvhHaTEbp_D9y7AgPg@mail.gmail.com>
2011-08-02 13:07 ` Copy ALSA buffer to the buffer allocated in my driver Clemens Ladisch
     [not found] <CAB+ez9vpzWQ3CXwoC64X6BEg=quzvJ8u-BhdMTr6vP+-=L4WRQ@mail.gmail.com>
2011-08-02 12:25 ` Daniel Mack
2011-08-02 12:03 `/ET!-i1S!-i
2011-08-02 12:08 ` Daniel Mack
     [not found] <CAB+ez9uWAFcL_K353Q5BCYj4AAF051a=SQU++BQ5ygV+SnqDjQ@mail.gmail.com>
2011-07-29 16:34 ` Clemens Ladisch
     [not found] <4E32C3F4.4050105@globaledgesoft.com>
2011-07-29 14:37 ` `/ET!-i1S!-i
2011-07-29 14:58   ` Clemens Ladisch

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=4E3671A8.1090209@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=yethish7@gmail.com \
    /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 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.