git: 15dc84ba5f50 - stable/14 - sound: Remove feed_matrix_apply_generic()

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Mon, 17 Mar 2025 18:36:50 UTC
The branch stable/14 has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=15dc84ba5f509a3aba0a3454c13207926b8ba2c5

commit 15dc84ba5f509a3aba0a3454c13207926b8ba2c5
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-03-10 20:19:46 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-03-17 18:28:54 +0000

    sound: Remove feed_matrix_apply_generic()
    
    It does what feed_matrix_apply() already does, so it is redundant.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D48036
    
    (cherry picked from commit b73b5f70e9f6be951e66531f6f57249eea4ba4dc)
---
 sys/dev/sound/pcm/feeder_matrix.c | 49 ---------------------------------------
 1 file changed, 49 deletions(-)

diff --git a/sys/dev/sound/pcm/feeder_matrix.c b/sys/dev/sound/pcm/feeder_matrix.c
index ab7922179867..2fee2be8bf5b 100644
--- a/sys/dev/sound/pcm/feeder_matrix.c
+++ b/sys/dev/sound/pcm/feeder_matrix.c
@@ -169,55 +169,6 @@ feed_matrix_reset(struct feed_matrix_info *info)
 	}
 }
 
-#ifdef FEEDMATRIX_GENERIC
-static void
-feed_matrix_apply_generic(struct feed_matrix_info *info,
-    uint8_t *src, uint8_t *dst, uint32_t count)
-{
-	intpcm64_t accum;
-	intpcm_t v;
-	int i, j;
-
-	do {
-		for (i = 0; info->matrix[i].chn[0] != SND_CHN_T_EOF;
-		    i++) {
-			if (info->matrix[i].chn[0] == SND_CHN_T_NULL) {
-				pcm_sample_write_norm(dst, 0, info->out);
-				dst += info->bps;
-				continue;
-			} else if (info->matrix[i].chn[1] ==
-			    SND_CHN_T_EOF) {
-				v = pcm_sample_read_norm(src +
-				    info->matrix[i].chn[0], info->in);
-				pcm_sample_write_norm(dst, v, info->out);
-				dst += info->bps;
-				continue;
-			}
-
-			accum = 0;
-			for (j = 0;
-			    info->matrix[i].chn[j] != SND_CHN_T_EOF;
-			    j++) {
-				v = pcm_sample_read_norm(src +
-				    info->matrix[i].chn[j], info->in);
-				accum += v;
-			}
-
-			accum = (accum * info->matrix[i].mul) >>
-			    info->matrix[i].shift;
-
-			FEEDMATRIX_CLIP_CHECK(accum, 32);
-
-			v = (accum > PCM_S32_MAX) ? PCM_S32_MAX :
-			    ((accum < PCM_S32_MIN) ? PCM_S32_MIN : accum);
-			pcm_sample_write_norm(dst, v, info->out);
-			dst += info->bps;
-		}
-		src += info->ialign;
-	} while (--count != 0);
-}
-#endif
-
 static int
 feed_matrix_setup(struct feed_matrix_info *info, struct pcmchan_matrix *m_in,
     struct pcmchan_matrix *m_out)