From: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
To: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 2/3] lib: Add ALSA library with dedicated helpers
Date: Mon, 21 Aug 2017 12:39:58 +0300 [thread overview]
Message-ID: <1503308398.1171.3.camel@linux.intel.com> (raw)
In-Reply-To: <20170821072520.GA3947@ahiler-desk1.ger.corp.intel.com>
On Mon, 2017-08-21 at 10:25 +0300, Arkadiusz Hiler wrote:
> On Fri, Aug 18, 2017 at 12:46:38PM +0300, Arkadiusz Hiler wrote:
> > On Thu, Aug 17, 2017 at 07:05:56PM +0300, Paul Kocialkowski wrote:
> > > This introduces an ALSA library, with dedicated helpers for
> > > handling
> > > playback and capture. It handles ALSA device identification and
> > > configuration as well as a run loop with callback mechanisms for
> > > feeding
> > > output data and handling input data.
> > >
> > > This library paves the way for testing audio going through display
> > > connectors, such as HDMI.
> > >
> > > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.co
> > > m>
> > > ---
> > > configure.ac | 3 +
> > > .../intel-gpu-tools/intel-gpu-tools-docs.xml | 1 +
> > > lib/Makefile.am | 7 +
> > > lib/igt.h | 1 +
> > > lib/igt_alsa.c | 624
> > > +++++++++++++++++++++
> > > lib/igt_alsa.h | 60 ++
> > > 6 files changed, 696 insertions(+)
> > > create mode 100644 lib/igt_alsa.c
> > > create mode 100644 lib/igt_alsa.h
> > >
> > > diff --git a/configure.ac b/configure.ac
> > > index 50aa86b5..e66273a4 100644
> > > --- a/configure.ac
> > > +++ b/configure.ac
> > > @@ -219,6 +219,9 @@ if test "x$enable_chamelium" = xyes; then
> > > AC_DEFINE(HAVE_CHAMELIUM, 1, [Enable Chamelium support])
> > > fi
> > >
> > > +PKG_CHECK_MODULES(ALSA, [alsa], [alsa=yes], [alsa=no])
> > > +AM_CONDITIONAL(HAVE_ALSA, [test "x$alsa" = xyes])
> >
> > please mention the new dependency in the README
>
> One more thing that came to my mind - how do we want to have this new
> dependency handled configure-time?
>
> I see three options:
>
> 1. Having it as optional component, so after we --enable-chamelium we
> can
> end up with the alsa part either being there or not.
>
> 2. Having to explicitly enable it, so that only with --enable-alsa we
> will have this new, shiny feature (and a nice ./configure-time fail).
>
> 3. Having to explicitly disable it, i.e. --enable-chamelium enables
> ALSA
> check, if it's not there configure fails and we can explicitly disable
> it, resulting in --enable-chamelium --disable-alsa switch combo.
>
> As a rule of thumb, anything similar to option #1 should be avoided to
> not suprise people with missing features depending on machine they
> compile on - unless we collectively decide that having optional
> component is okay (e.g. in case we have a fallback so it doesn't
> matter
> that much).
>
> IMO in this case we should go with option #2.
Note that this series is not tied to the chamelium at all: it requires
an HDMI-VGA adapter with audio out instead of a chamelium.
For this reason, it wouldn't make sense to tie it to --enable-chamelium.
The problem remains the same though: the audio part (patch 1/3) requires
the GSL library and the alsa part requires the alsa lib and we need to
decide how to handle the dependencies.
I think what would make the most sense is to have an --enable-audio
parameter (referring to the newly-introduced audio test, not the audio
library) that requires the alsa and gsl libraries. Then, when audio
support is added to the chamelium code, the alsa library should become a
dependency for --enable-chamelium as well.
For the latter, it would be consistent with the idea that --enable-
chamelium pulls-in all possible chamelium tests and thus requires all
their dependencies, instead of only enabling the tests for which
dependencies are installed.
Does that seem agreeable?
--
Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo, Finland
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-08-21 9:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-17 16:05 [PATCH i-g-t 1/3] lib: Add audio library with dedicated helpers Paul Kocialkowski
2017-08-17 16:05 ` [PATCH i-g-t 2/3] lib: Add ALSA " Paul Kocialkowski
2017-08-18 9:46 ` Arkadiusz Hiler
2017-08-21 7:25 ` Arkadiusz Hiler
2017-08-21 9:39 ` Paul Kocialkowski [this message]
2017-08-21 9:45 ` Arkadiusz Hiler
2017-08-18 16:20 ` Lyude Paul
2017-08-21 15:11 ` Paul Kocialkowski
2017-08-17 16:05 ` [PATCH i-g-t 3/3] tests: Introduce audio tests, starting with HDMI signal integrity Paul Kocialkowski
2017-08-18 16:15 ` Lyude Paul
2017-08-21 15:14 ` Paul Kocialkowski
2017-08-21 15:26 ` Lyude Paul
2017-08-17 16:24 ` ✓ Fi.CI.BAT: success for series starting with [1/3] lib: Add audio library with dedicated helpers Patchwork
2017-08-18 9:59 ` Petri Latvala
2017-08-18 16:16 ` [PATCH i-g-t 1/3] " Lyude Paul
2017-08-21 15:27 ` Paul Kocialkowski
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=1503308398.1171.3.camel@linux.intel.com \
--to=paul.kocialkowski@linux.intel.com \
--cc=arkadiusz.hiler@intel.com \
--cc=intel-gfx@lists.freedesktop.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 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.