alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Guedes, Andre" <andre.guedes@intel.com>
To: "pierre-louis.bossart@linux.intel.com"
	<pierre-louis.bossart@linux.intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Cc: "Girdwood, Liam R" <liam.r.girdwood@intel.com>
Subject: Re: [RFC - AAF PCM plugin 2/5] aaf: Load configuration parameters
Date: Tue, 21 Aug 2018 21:57:55 +0000	[thread overview]
Message-ID: <1534888673.4547.105.camel@intel.com> (raw)
In-Reply-To: <5e5c3cc7-194c-0cde-2bbb-8fcb455e4e2b@linux.intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 3299 bytes --]

Hi Pierre,

On Mon, 2018-08-20 at 22:16 -0500, Pierre-Louis Bossart wrote:
> > +Plugin Configuration
> > +--------------------
> > +
> > +The plugin parameters are passed via ALSA configuration file. They
> > are defined
> > +as follows:
> > +
> > +	* ifname: Network interface used to transmit/receive AVTP
> > packets.
> > +
> > +	* addr: Stream destination MAC address.
> 
> including multi-cast address?

Correct.

> > +
> > +	* prio: Priority used by the plugin to transmit AVTP
> > traffic. This
> > +	  option is relevant only when operating in playback mode.
> > +
> > +	* streamid: Stream ID associated with the AAF stream
> > transmitted or
> > +	  received by the plugin.
> 
> So the streamid has to be statically configured, right?

Correct.

> If there an assumption that all streams exposed in this
> configuration 
> file can all be used concurrently? Or put differently that the
> streams 
> are only exposed if they can be used independently at any time?

Yes, the plugin is expected to handle multiple streams concurrently. I
have tested with two, mimicking one Class A and one Class B streams.

> > +	pcm.aaf {
> > +		type aaf
> > +		ifname eth0
> > +		addr AA:AA:AA:AA:AA:AA
> > +		prio 3
> > +		streamid BB:BB:BB:BB:BB:BB:0001
> > +		mtt 2000
> > +		time_uncertainty 125
> > +		frames_per_pkt 6
> > +	}
> > +
> > +Put the above to ~/.asoundrc (or /etc/asound.conf), and use the
> > AAF PCM virtual
> > +device with your ALSA apps. For example, to stream the content
> > from a wav file
> > +through the network, run:
> > +
> > +	$ aplay -Daaf foo.wav
> 
> How do you deal with multiple streams then? -Daaf:<stream_number> ?

Two ways:

1) Define multiple AAF devices in asoundrc (e.g. aaf0, aaf1, aaf2,
etc.) and select them using the -D option e.g.:

$ aplay -D aaf0 foo.wav
$ aplay -D aaf1 bar.wav

2) Leverage ALSA config runtime arguments e.g. define the aaf device
as:

pcm.aaf {
        @args [ IFNAME ADDR PRIO STREAMID MTT UNCERTAINTY FRAMES ]
        @args.IFNAME {
                type string
        }
        @args.ADDR {
                type string
        }
        @args.PRIO {
                type integer
        }
        @args.STREAMID {
                type string
        }
        @args.MTT {
                type integer
        }
        @args.UNCERTAINTY {
                type integer
        }
        @args.FRAMES {
                type integer
        }

        type aaf
        ifname $IFNAME
        addr $ADDR
        prio $PRIO
        streamid $STREAMID
        mtt $MTT
        time_uncertainty $UNCERTAINTY
        frames_per_pkt $FRAMES
}

And pass the device parameters via -D option like this:

$ aplay -D
aaf:eth0.1,01:AA:AA:AA:AA:AA,3,AA:BB:CC:DD:EE:FF:0001,2000,125,6
foo.wav

$ aplay -D
aaf:eth0.2,01:BB:BB:BB:BB:BB,3,AA:BB:CC:DD:EE:FF:0002,50000,1000,12
bar.wav

Particularly, I'm using 2) since it is more practical for testing
purposes.

> > +
> > +To receive the AAF stream generated by the previous command, run:
> > +
> > +	$ arecord -Daaf
> 
> Did you mean on a different machine or are there any loopback
> capabilities?

Yep, on a different machine. I'll add that info here.

Regards,

Andre

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2018-08-21 21:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21  1:06 [RFC - AAF PCM plugin 0/5] Introduce AVTP Audio Format (AAF) plugin Andre Guedes
2018-08-21  1:06 ` [RFC - AAF PCM plugin 1/5] aaf: Introduce plugin skeleton Andre Guedes
2018-08-21  1:06 ` [RFC - AAF PCM plugin 2/5] aaf: Load configuration parameters Andre Guedes
2018-08-21  3:16   ` Pierre-Louis Bossart
2018-08-21 21:57     ` Guedes, Andre [this message]
2018-08-21  1:06 ` [RFC - AAF PCM plugin 3/5] aaf: Implement Playback mode support Andre Guedes
2018-08-21  3:37   ` Pierre-Louis Bossart
2018-08-21 21:58     ` Guedes, Andre
2018-08-21 22:51       ` Pierre-Louis Bossart
2018-08-23  0:46         ` Guedes, Andre
2018-08-23  2:25           ` Pierre-Louis Bossart
2018-08-23 18:32             ` Guedes, Andre
2018-08-23 18:51               ` Pierre-Louis Bossart
2018-08-23 21:55                 ` Guedes, Andre
2018-08-25  8:13               ` Takashi Sakamoto
2018-08-29  1:00                 ` Guedes, Andre
2018-08-31  4:33                   ` Takashi Sakamoto
2018-08-31 23:18                     ` Guedes, Andre
2018-09-03  1:24                       ` Takashi Sakamoto
2018-09-07  1:40                         ` Guedes, Andre
2018-09-12 23:45               ` Guedes, Andre
2018-08-21  4:31   ` Takashi Sakamoto
2018-08-21 22:40     ` Guedes, Andre
2018-08-21  1:06 ` [RFC - AAF PCM plugin 4/5] aaf: Prepare for Capture " Andre Guedes
2018-08-21  1:06 ` [RFC - AAF PCM plugin 5/5] aaf: Implement " Andre Guedes
2018-08-21  5:17   ` Takashi Sakamoto
2018-08-21 23:11     ` Guedes, Andre

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=1534888673.4547.105.camel@intel.com \
    --to=andre.guedes@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=liam.r.girdwood@intel.com \
    --cc=pierre-louis.bossart@linux.intel.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 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).