From: Stas Sergeev <stsp@list.ru>
To: "Gabriel M. Beddingfield" <gabrbedd@gmail.com>
Cc: ALSA devel <alsa-devel@alsa-project.org>,
Lars-Peter Clausen <lars@metafoo.de>,
stsp@users.sourceforge.net
Subject: Re: [PATCH] ASoC: define playback and capture streams in dummy codec
Date: Tue, 16 Apr 2013 20:34:56 +0400 [thread overview]
Message-ID: <516D7DB0.5040804@list.ru> (raw)
In-Reply-To: <51682747.9070300@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]
12.04.2013 19:24, Gabriel M. Beddingfield пишет:
> On 04/12/2013 08:20 AM, Stas Sergeev wrote:
>>> He means that the commit message. Your commit message says what the
>>> patch does. It does not say why the patch is needed.
>> Yes.
>> But what should I add to the commit message, if the
>> only thing I know about this patch, is that I am not getting
>> any sound without it? :) The reason should be obvious for
>> whoever is familiar with that subsystem, but its not me.
>>
>
> Yep, just formalize the "I am not getting any sound with it"
> statement. :-)
Hi, Would something like the attached patch be good to
help formalizing this? With that patch I am getting:
---
[ 2.800190] asoc: no playback or capture streams
available
[ 2.805158] asoc: can't create pcm
Pri_Dai
[ 2.809241] asoc: failed to instantiate card I2S: -22
---
which is much better than before.
If I get any ACKs on this one, I'll submit it too.
[-- Attachment #2: a.diff --]
[-- Type: text/x-patch, Size: 568 bytes --]
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 394fb3b..fb3a401 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2140,6 +2140,11 @@ static int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
if (codec_dai->driver->capture.channels_min)
capture = 1;
+ if (playback + capture == 0) {
+ pr_err("asoc: no playback or capture streams available\n");
+ return -EINVAL;
+ }
+
dev_dbg(rtd->card->dev, "registered pcm #%d %s\n",num,new_name);
ret = snd_pcm_new(rtd->card->snd_card, new_name,
num, playback, capture, &pcm);
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2013-04-16 16:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 10:53 [PATCH] ASoC: define playback and capture streams in dummy codec Stas Sergeev
2013-04-12 10:59 ` Mark Brown
2013-04-12 14:19 ` Stas Sergeev
2013-04-12 15:13 ` Gabriel M. Beddingfield
2013-04-12 15:20 ` Stas Sergeev
2013-04-12 15:24 ` Gabriel M. Beddingfield
2013-04-16 16:34 ` Stas Sergeev [this message]
2013-04-12 15:31 ` Lars-Peter Clausen
2013-04-12 16:37 ` Stas Sergeev
2013-04-12 16:55 ` Lars-Peter Clausen
2013-04-12 19:19 ` Stas Sergeev
2013-04-17 12:34 ` Stas Sergeev
2013-04-17 13:31 ` Mark Brown
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=516D7DB0.5040804@list.ru \
--to=stsp@list.ru \
--cc=alsa-devel@alsa-project.org \
--cc=gabrbedd@gmail.com \
--cc=lars@metafoo.de \
--cc=stsp@users.sourceforge.net \
/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