From: Takashi Iwai <tiwai@suse.de>
To: "Miartus, Adam (Arion Recruitment; ADITG/ESM)" <amiartus@de.adit-jv.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"Pape, Andreas (ADITG/ESS1)" <apape@de.adit-jv.com>
Subject: Re: [ALSA patch] [PATCH 1/2] alsa: pcm: add unsupported OPS
Date: Wed, 10 Jul 2019 16:59:53 +0200 [thread overview]
Message-ID: <s5hftneq6ja.wl-tiwai@suse.de> (raw)
In-Reply-To: <B174E9FCEE9A8C46B11E4DF2E32993627B7FCA@HI2EXCH01.adit-jv.com>
On Wed, 10 Jul 2019 16:58:06 +0200,
Miartus, Adam (Arion Recruitment; ADITG/ESM) wrote:
>
> > -----Original Message-----
> > From: Takashi Iwai <tiwai@suse.de>
> > Sent: Dienstag, 9. Juli 2019 14:25
> > To: Miartus, Adam (Arion Recruitment; ADITG/ESM) <amiartus@de.adit-
> > jv.com>
> > Cc: alsa-devel@alsa-project.org; Pape, Andreas (ADITG/ESS1)
> > <apape@de.adit-jv.com>
> > Subject: Re: [ALSA patch] [PATCH 1/2] alsa: pcm: add unsupported OPS
> >
> > On Mon, 08 Jul 2019 13:04:48 +0200,
> > Adam Miartus wrote:
> > >
> > > From: Andreas Pape <apape@de.adit-jv.com>
> > >
> > > Signed-off-by: Andreas Pape <apape@de.adit-jv.com>
> > > Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
> >
> > No description isn't good at all. There must be something you can
> > explain in details here.
>
> Certainly, I will add explanation in patch v2.
>
> >
> > About the changes:
> >
> > > +#define PCM_UNSUPPORTED_ERR (-ENOSYS)
> > > +void snd_pcm_unsupported_dump(snd_pcm_t *pcm, snd_output_t
> > *out)
> > > +{
> > > + snd_output_printf(out, "unsupported\n");
> > > +}
> >
> > IMO, we don't need to show anything if it's dummy.
> > And, maybe it's more straightforward to let the PCM core allow NULL
> > ops?
> >
>
> If you agree I could add following in patch v2, then we could drop snd_pcm_unsupported_dump function altogether
>
> diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
> index e0ceccc..4d91d4d 100644
> --- a/src/pcm/pcm.c
> +++ b/src/pcm/pcm.c
> @@ -2277,7 +2277,8 @@ int snd_pcm_dump(snd_pcm_t *pcm, snd_output_t *out)
> {
> assert(pcm);
> assert(out);
> - pcm->ops->dump(pcm->op_arg, out);
> + if (pcm->ops->dump)
> + pcm->ops->dump(pcm->op_arg, out);
> return 0;
> }
I *guess* this would be simpler in the end, although I'm fine with
your original idea, too. Let's see and compare the both results.
thanks,
Takashi
next prev parent reply other threads:[~2019-07-10 14:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 11:04 [PATCH 0/2] expand dshare to allow audio clock when not streaming data Adam Miartus
2019-07-08 11:04 ` [PATCH 1/2] alsa: pcm: add unsupported OPS Adam Miartus
2019-07-09 12:25 ` [ALSA patch] " Takashi Iwai
2019-07-10 14:58 ` Miartus, Adam (Arion Recruitment; ADITG/ESM)
2019-07-10 14:59 ` Takashi Iwai [this message]
2019-07-11 14:58 ` Miartus, Adam (Arion Recruitment; ADITG/ESM)
2019-07-16 5:53 ` Takashi Iwai
2019-07-08 11:04 ` [PATCH 2/2] alsa: dshare: allow missing bindings Adam Miartus
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=s5hftneq6ja.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=amiartus@de.adit-jv.com \
--cc=apape@de.adit-jv.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