Message ID | 20230421141006.1005452-1-oswald.buddenhagen@gmx.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 798524389a7822a487ac0245d177f9d3bf33a22d |
Headers | show |
Series | [1/7] ALSA: emu10k1: drop redundant snd_emu10k1_efx_playback_hw_free() | expand |
On Fri, 21 Apr 2023 16:10:00 +0200, Oswald Buddenhagen wrote: > > Or actually, replace snd_emu10k1_playback_hw_free() with it, as that is > a subset. > > Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> The code changes in the whole patch series look OK, but still a few minor corrections in the change logs (missing commit summary, etc) are needed. Also, when you submit this size of patch series, please make a cover letter and explain what the series are intended. thanks, Takashi
On Fri, Apr 21, 2023 at 04:56:52PM +0200, Takashi Iwai wrote: >Also, when you submit this size of patch series, please make a cover >letter and explain what the series are intended. > i've actually pondered that and concluded that it would be kinda pointless, because the theme "cleanups" is rather obvious. for the other series it would be "fpga access fixes & cleanups", which also seemed obvious enough. anyway, i'll lower the "threshold of noteworthiness" for the future. regards
On Fri, 21 Apr 2023 16:56:52 +0200, Takashi Iwai wrote: > > On Fri, 21 Apr 2023 16:10:00 +0200, > Oswald Buddenhagen wrote: > > > > Or actually, replace snd_emu10k1_playback_hw_free() with it, as that is > > a subset. > > > > Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> > > The code changes in the whole patch series look OK, but still a few > minor corrections in the change logs (missing commit summary, etc) are > needed. > > Also, when you submit this size of patch series, please make a cover > letter and explain what the series are intended. I applied applicable ones in the series (patches 1, 2, 3, 5, 7) now. Please resubmit patches 4 and 6. thanks, Takashi
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c index 48af77ae8020..b89382aa4db6 100644 --- a/sound/pci/emu10k1/emupcm.c +++ b/sound/pci/emu10k1/emupcm.c @@ -429,36 +429,6 @@ static int snd_emu10k1_playback_hw_params(struct snd_pcm_substream *substream, } static int snd_emu10k1_playback_hw_free(struct snd_pcm_substream *substream) -{ - struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); - struct snd_pcm_runtime *runtime = substream->runtime; - struct snd_emu10k1_pcm *epcm; - - if (runtime->private_data == NULL) - return 0; - epcm = runtime->private_data; - if (epcm->extra) { - snd_emu10k1_voice_free(epcm->emu, epcm->extra); - epcm->extra = NULL; - } - if (epcm->voices[1]) { - snd_emu10k1_voice_free(epcm->emu, epcm->voices[1]); - epcm->voices[1] = NULL; - } - if (epcm->voices[0]) { - snd_emu10k1_voice_free(epcm->emu, epcm->voices[0]); - epcm->voices[0] = NULL; - } - if (epcm->memblk) { - snd_emu10k1_free_pages(emu, epcm->memblk); - epcm->memblk = NULL; - epcm->start_addr = 0; - } - snd_pcm_lib_free_pages(substream); - return 0; -} - -static int snd_emu10k1_efx_playback_hw_free(struct snd_pcm_substream *substream) { struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; @@ -1372,7 +1342,7 @@ static const struct snd_pcm_ops snd_emu10k1_efx_playback_ops = { .open = snd_emu10k1_efx_playback_open, .close = snd_emu10k1_efx_playback_close, .hw_params = snd_emu10k1_playback_hw_params, - .hw_free = snd_emu10k1_efx_playback_hw_free, + .hw_free = snd_emu10k1_playback_hw_free, .prepare = snd_emu10k1_efx_playback_prepare, .trigger = snd_emu10k1_efx_playback_trigger, .pointer = snd_emu10k1_efx_playback_pointer,
Or actually, replace snd_emu10k1_playback_hw_free() with it, as that is a subset. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> --- sound/pci/emu10k1/emupcm.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-)