From b9517558445f61f3ff423fc264a3efdaa15dd3ca Mon Sep 17 00:00:00 2001 From: miko Date: Mon, 3 Sep 2018 05:37:32 +0000 Subject: [PATCH] Remove round_buffersize function from drivers using the default buffersize provided by the upper layer audio driver. ok ratchov@ --- sys/dev/pci/auixp.c | 15 ++------------- sys/dev/pci/cs4280.c | 15 ++------------- sys/dev/pci/envy.c | 11 ++--------- 3 files changed, 6 insertions(+), 35 deletions(-) diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c index b0bf480baeb..9191a557a07 100644 --- a/sys/dev/pci/auixp.c +++ b/sys/dev/pci/auixp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auixp.c,v 1.39 2017/09/08 05:36:52 deraadt Exp $ */ +/* $OpenBSD: auixp.c,v 1.40 2018/09/03 05:37:32 miko Exp $ */ /* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */ /* @@ -124,7 +124,6 @@ int auixp_get_port(void *, mixer_ctrl_t *); int auixp_query_devinfo(void *, mixer_devinfo_t *); void * auixp_malloc(void *, int, size_t, int, int); void auixp_free(void *, void *, int); -size_t auixp_round_buffersize(void *, int, size_t); int auixp_get_props(void *); int auixp_intr(void *); int auixp_allocmem(struct auixp_softc *, size_t, size_t, @@ -181,7 +180,7 @@ struct audio_hw_if auixp_hw_if = { auixp_query_devinfo, auixp_malloc, auixp_free, - auixp_round_buffersize, + NULL, /* round_buffersize */ auixp_get_props, auixp_trigger_output, auixp_trigger_input @@ -453,16 +452,6 @@ auixp_query_devinfo(void *hdl, mixer_devinfo_t *di) return co->codec_if->vtbl->query_devinfo(co->codec_if, di); } - -size_t -auixp_round_buffersize(void *hdl, int direction, size_t bufsize) -{ - - /* XXX force maximum? i.e. 256 kb? */ - return bufsize; -} - - int auixp_get_props(void *hdl) { diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c index cb0e619cc64..926e17bfc12 100644 --- a/sys/dev/pci/cs4280.c +++ b/sys/dev/pci/cs4280.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4280.c,v 1.51 2016/12/26 17:38:14 jca Exp $ */ +/* $OpenBSD: cs4280.c,v 1.52 2018/09/03 05:37:32 miko Exp $ */ /* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */ /* @@ -206,7 +206,6 @@ int cs4280_mixer_get_port(void *, mixer_ctrl_t *); int cs4280_query_devinfo(void *addr, mixer_devinfo_t *dip); void *cs4280_malloc(void *, int, size_t, int, int); void cs4280_free(void *, void *, int); -size_t cs4280_round_buffersize(void *, int, size_t); int cs4280_get_props(void *); int cs4280_trigger_output(void *, void *, void *, int, void (*)(void *), void *, struct audio_params *); @@ -253,7 +252,7 @@ struct audio_hw_if cs4280_hw_if = { cs4280_query_devinfo, cs4280_malloc, cs4280_free, - cs4280_round_buffersize, + NULL, cs4280_get_props, cs4280_trigger_output, cs4280_trigger_input @@ -1060,16 +1059,6 @@ cs4280_round_blocksize(void *hdl, int blk) return (blk < CS4280_ICHUNK ? CS4280_ICHUNK : blk & -CS4280_ICHUNK); } -size_t -cs4280_round_buffersize(void *addr, int direction, size_t size) -{ - /* although real dma buffer size is 4KB, - * let the audio.c driver use a larger buffer. - * ( suggested by Lennart Augustsson. ) - */ - return (size); -} - int cs4280_get_props(void *hdl) { diff --git a/sys/dev/pci/envy.c b/sys/dev/pci/envy.c index 94daaacabb1..aae043798c6 100644 --- a/sys/dev/pci/envy.c +++ b/sys/dev/pci/envy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: envy.c,v 1.72 2018/03/17 13:35:12 ratchov Exp $ */ +/* $OpenBSD: envy.c,v 1.73 2018/09/03 05:37:32 miko Exp $ */ /* * Copyright (c) 2007 Alexandre Ratchov * @@ -102,7 +102,6 @@ void envy_freem(void *, void *, int); int envy_set_params(void *, int, int, struct audio_params *, struct audio_params *); int envy_round_blocksize(void *, int); -size_t envy_round_buffersize(void *, int, size_t); int envy_trigger_output(void *, void *, void *, int, void (*)(void *), void *, struct audio_params *); int envy_trigger_input(void *, void *, void *, int, @@ -196,7 +195,7 @@ struct audio_hw_if envy_hw_if = { envy_query_devinfo, /* query_devinfo */ envy_allocm, /* malloc */ envy_freem, /* free */ - envy_round_buffersize, /* round_buffersize */ + NULL, /* round_buffersize */ envy_get_props, /* get_props */ envy_trigger_output, /* trigger_output */ envy_trigger_input /* trigger_input */ @@ -1887,12 +1886,6 @@ envy_round_blocksize(void *self, int blksz) return (blksz + 0x1f) & ~0x1f; } -size_t -envy_round_buffersize(void *self, int dir, size_t bufsz) -{ - return bufsz; -} - #ifdef ENVY_DEBUG void envy_pintr(struct envy_softc *sc) -- 2.20.1