diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1287,7 +1287,7 @@ __func__); goto out2; } - if (chn_addfeeder(c, fc, NULL)) { + if (feeder_add(c, fc, NULL)) { device_printf(d->dev, "%s(): failed to add feeder\n", __func__); goto out2; } @@ -1365,7 +1365,7 @@ if (CHN_LOCKOWNED(c)) CHN_UNLOCK(c); if (ret) { - while (chn_removefeeder(c) == 0) + while (feeder_remove(c) == 0) ; if (c->devinfo) { if (CHANNEL_FREE(c->methods, c->devinfo)) @@ -1407,7 +1407,7 @@ chn_trigger(c, PCMTRIG_ABORT); CHN_UNLOCK(c); } - while (chn_removefeeder(c) == 0) + while (feeder_remove(c) == 0) ; if (CHANNEL_FREE(c->methods, c->devinfo)) sndbuf_free(b); @@ -2300,7 +2300,7 @@ else bass = ((bass & 0x7f) + ((bass >> 8) & 0x7f)) >> 1; - f = chn_findfeeder(c, FEEDER_EQ); + f = feeder_find(c, FEEDER_EQ); if (f != NULL) { if (FEEDER_SET(f, FEEDEQ_TREBLE, treble) != 0) device_printf(c->dev, diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -58,10 +58,10 @@ u_int32_t snd_fmtbestchannel(u_int32_t fmt, u_int32_t *fmts); u_int32_t snd_fmtbest(u_int32_t fmt, u_int32_t *fmts); -int chn_addfeeder(struct pcm_channel *c, struct feeder_class *fc, +int feeder_add(struct pcm_channel *c, struct feeder_class *fc, struct pcm_feederdesc *desc); -int chn_removefeeder(struct pcm_channel *c); -struct pcm_feeder *chn_findfeeder(struct pcm_channel *c, u_int32_t type); +int feeder_remove(struct pcm_channel *c); +struct pcm_feeder *feeder_find(struct pcm_channel *c, u_int32_t type); void feeder_printchain(struct pcm_feeder *head); int feeder_chain(struct pcm_channel *); diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -232,7 +232,7 @@ } int -chn_addfeeder(struct pcm_channel *c, struct feeder_class *fc, struct pcm_feederdesc *desc) +feeder_add(struct pcm_channel *c, struct feeder_class *fc, struct pcm_feederdesc *desc) { struct pcm_feeder *nf; @@ -250,7 +250,7 @@ } int -chn_removefeeder(struct pcm_channel *c) +feeder_remove(struct pcm_channel *c) { struct pcm_feeder *f; @@ -264,7 +264,7 @@ } struct pcm_feeder * -chn_findfeeder(struct pcm_channel *c, u_int32_t type) +feeder_find(struct pcm_channel *c, u_int32_t type) { struct pcm_feeder *f; diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -157,7 +157,7 @@ desc->in = cdesc->current.afmt; desc->out = cdesc->target.afmt; - ret = chn_addfeeder(c, fc, desc); + ret = feeder_add(c, fc, desc); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_format\n", __func__); @@ -230,7 +230,7 @@ desc->in = cdesc->current.afmt; desc->out = desc->in; - ret = chn_addfeeder(c, fc, desc); + ret = feeder_add(c, fc, desc); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_rate\n", __func__); @@ -309,7 +309,7 @@ desc->out = SND_FORMAT(cdesc->current.afmt, cdesc->target.matrix->channels, cdesc->target.matrix->ext); - ret = chn_addfeeder(c, fc, desc); + ret = feeder_add(c, fc, desc); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_matrix\n", __func__); @@ -365,7 +365,7 @@ desc->in = cdesc->current.afmt; desc->out = desc->in; - ret = chn_addfeeder(c, fc, desc); + ret = feeder_add(c, fc, desc); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_volume\n", __func__); @@ -433,7 +433,7 @@ desc->in = cdesc->current.afmt; desc->out = desc->in; - ret = chn_addfeeder(c, fc, desc); + ret = feeder_add(c, fc, desc); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_eq\n", __func__); @@ -472,7 +472,7 @@ return (ENOTSUP); } - ret = chn_addfeeder(c, fc, NULL); + ret = feeder_add(c, fc, NULL); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_root\n", __func__); @@ -513,7 +513,7 @@ desc->in = cdesc->current.afmt; desc->out = desc->in; - ret = chn_addfeeder(c, fc, desc); + ret = feeder_add(c, fc, desc); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_mixer\n", __func__); @@ -588,7 +588,7 @@ CHN_LOCKASSERT(c); /* Remove everything first. */ - while (chn_removefeeder(c) == 0) + while (feeder_remove(c) == 0) ; KASSERT(c->feeder == NULL, ("feeder chain not empty")); diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -584,7 +584,7 @@ CHN_FOREACH(c, d, channels.pcm.busy) { CHN_LOCK(c); - f = chn_findfeeder(c, FEEDER_EQ); + f = feeder_find(c, FEEDER_EQ); if (f != NULL) (void)FEEDER_SET(f, FEEDEQ_STATE, val); CHN_UNLOCK(c); @@ -643,7 +643,7 @@ CHN_FOREACH(c, d, channels.pcm.busy) { CHN_LOCK(c); - f = chn_findfeeder(c, FEEDER_EQ); + f = feeder_find(c, FEEDER_EQ); if (f != NULL) (void)FEEDER_SET(f, FEEDEQ_PREAMP, val); CHN_UNLOCK(c); diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -268,7 +268,7 @@ PCM_ACQUIRE(d); CHN_FOREACH(c, d, channels.pcm) { CHN_LOCK(c); - f = chn_findfeeder(c, FEEDER_RATE); + f = feeder_find(c, FEEDER_RATE); if (f == NULL || f->data == NULL || CHN_STARTED(c)) { CHN_UNLOCK(c); continue; diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -224,7 +224,7 @@ CHN_FOREACH(c, d, channels.pcm.busy) { CHN_LOCK(c); - f = chn_findfeeder(c, FEEDER_EQ); + f = feeder_find(c, FEEDER_EQ); if (f != NULL) (void)FEEDER_SET(f, tone, level); CHN_UNLOCK(c);