From: Simon Ser <simon.ser@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v7 4/8] lib/igt_alsa: use variables to improve readability
Date: Tue, 23 Apr 2019 16:04:55 +0300 [thread overview]
Message-ID: <20190423130459.31594-5-simon.ser@intel.com> (raw)
In-Reply-To: <20190423130459.31594-1-simon.ser@intel.com>
Most people don't have "remember what the last two parameters of
snd_pcm_set_params are" in their lifegoals list. Use variables so that it's
clearer what those are.
Signed-off-by: Simon Ser <simon.ser@intel.com>
---
lib/igt_alsa.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/igt_alsa.c b/lib/igt_alsa.c
index 3b1a9e90..a478686a 100644
--- a/lib/igt_alsa.c
+++ b/lib/igt_alsa.c
@@ -426,13 +426,16 @@ void alsa_configure_output(struct alsa *alsa, int channels,
snd_pcm_t *handle;
int ret;
int i;
+ int soft_resample = 0; /* Don't allow ALSA to resample */
+ unsigned int latency = 0;
for (i = 0; i < alsa->output_handles_count; i++) {
handle = alsa->output_handles[i];
ret = snd_pcm_set_params(handle, SND_PCM_FORMAT_S16_LE,
SND_PCM_ACCESS_RW_INTERLEAVED,
- channels, sampling_rate, 0, 0);
+ channels, sampling_rate,
+ soft_resample, latency);
igt_assert(ret >= 0);
}
--
2.21.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-04-23 13:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 13:04 [igt-dev] [PATCH i-g-t v7 0/8] tests/kms_chamelium: add dp-audio test Simon Ser
2019-04-23 13:04 ` [igt-dev] [PATCH i-g-t v7 1/8] " Simon Ser
2019-04-25 10:16 ` Petri Latvala
2019-04-25 11:37 ` Arkadiusz Hiler
2019-04-23 13:04 ` [igt-dev] [PATCH i-g-t v7 2/8] tests/kms_chamelium: capture audio data in real-time Simon Ser
2019-04-23 13:04 ` [igt-dev] [PATCH i-g-t v7 3/8] lib/igt_{alsa, audio}: improve logging Simon Ser
2019-04-25 9:53 ` Martin Peres
2019-04-23 13:04 ` Simon Ser [this message]
2019-04-25 9:54 ` [igt-dev] [PATCH i-g-t v7 4/8] lib/igt_alsa: use variables to improve readability Martin Peres
2019-04-23 13:04 ` [igt-dev] [PATCH i-g-t v7 5/8] tests/kms_chamelium: test we receive a signal from both audio channels Simon Ser
2019-04-23 13:04 ` [igt-dev] [PATCH i-g-t v7 6/8] tests/kms_chamelium: test audio channels are not mixed up Simon Ser
2019-04-23 13:04 ` [igt-dev] [PATCH i-g-t v7 7/8] tests/kms_chamelium: run audio test with multiple sampling rates Simon Ser
2019-04-23 13:04 ` [igt-dev] [PATCH i-g-t v7 8/8] HAX: add dp-audio test to fast-feedback Simon Ser
2019-04-23 15:29 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_chamelium: add dp-audio test (rev8) Patchwork
2019-04-23 18:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-04-25 10:00 ` [igt-dev] [PATCH i-g-t v7 0/8] tests/kms_chamelium: add dp-audio test Martin Peres
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=20190423130459.31594-5-simon.ser@intel.com \
--to=simon.ser@intel.com \
--cc=igt-dev@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.