From: "René Herman" <rene.herman@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Torsten Schenk <torsten.schenk@zoho.com>
Subject: Re: [PATCH 0/3] snd-usb-6fire: firmware load and pulseaudio assumption
Date: Tue, 21 Jul 2020 10:29:29 +0200 [thread overview]
Message-ID: <a0684b66-cbe3-de56-1841-3dc10df1fd5c@gmail.com> (raw)
In-Reply-To: <s5hlfjdz46r.wl-tiwai@suse.de>
On 21-07-2020 10:02, Takashi Iwai wrote:
> The patch needs to point to the right path that is applicable with
> patch -p1 option, i.e. it should be like
> diff -up a/sound/usb/6fire/xxx.c b/sound/usb/6fire/xxx.c
>
> At best use git for creating / submitting a patch.
Blast. I did, but worked against an isolated (DKMS-ed) version of the
kernel driver. Pardon. Shall re-setup against the kernel as such and
resend after dealing with your other two comments. I.e.,
Re: [PATCH 1/3] snd-usb-6fire: Move DMA-buffer off of the stack
> Could you rather change return with goto out (with ret variable
> set)? In that way we can see what actually you changed more clearly.
I already did exactly that though and in fact, the original not doing so
is what makes the patch seem involved. With the added kmalloc() I change
it so that all returns goto out, which kfree()s again. The only one that
does not is when kmalloc() fails, i.e., when there's nothing to kfree().
I suppose you just misread and do not need to have that single one go
through a goto as well?
Re: [PATCH 3/3] snd-usb-6fire: Unmark struct snd_pcm_hardware const
> This must be superfluous. usb6fire_pcm_open() changes the field of
> the copied pcm_hw, not the original pcm_hw itself. Otherwise we
> must have got already a compile warning / error.
Unfortunately no; it's as mentioned in the cover letter accessed via
pointer: usb6fire_pcm_open() sets "alsa_rt->hw = pcm_hw" and then
changes pcm_hw as e.g. "alsa_rt->hw.channels_max = OUT_N_CHANNELS;".
I.e., not a copy.
And yes, it had me wonder if this was "allowed" in the first place as
well (the same pcm_hw structure is also shared between playback and
capture) but it does seem to work fine, so just unmarking it const seems
a minimal fix or, better, "cleanup", since nothing complained, but the
const qualifier no doubt at least /conceptually/ means it could be an issue.
I'll re-setup against the kernel as such and wait for reply on the above
two comments to know what to re-submit.
Regards,
Rene
next prev parent reply other threads:[~2020-07-21 8:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 6:48 [PATCH 0/3] snd-usb-6fire: firmware load and pulseaudio assumption René Herman
2020-07-21 6:48 ` [PATCH 1/3] snd-usb-6fire: Move DMA-buffer off of the stack René Herman
2020-07-21 8:00 ` Takashi Iwai
2020-07-21 6:48 ` [PATCH 2/3] snd-usb-6fire: Pulseaudio needs snd_pcm_hardware.channels_min > 1 René Herman
2020-07-21 6:48 ` [PATCH 3/3] snd-usb-6fire: Unmark struct snd_pcm_hardware const René Herman
2020-07-21 7:57 ` Takashi Iwai
2020-07-21 8:02 ` [PATCH 0/3] snd-usb-6fire: firmware load and pulseaudio assumption Takashi Iwai
2020-07-21 8:29 ` René Herman [this message]
2020-07-21 8:37 ` Takashi Iwai
2020-07-21 10:07 ` René Herman
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=a0684b66-cbe3-de56-1841-3dc10df1fd5c@gmail.com \
--to=rene.herman@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
--cc=torsten.schenk@zoho.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