Loading asoc/msm-compress-q6-v2.c +11 −3 Original line number Diff line number Diff line Loading @@ -5621,9 +5621,17 @@ static int msm_compr_add_channel_mixer_controls(struct snd_soc_pcm_runtime *rtd) return ret; } static int msm_compr_new(struct snd_soc_pcm_runtime *rtd) int msm_compr_new(struct snd_soc_pcm_runtime *rtd, int num) { int rc; int rc = 0; if (rtd == NULL) { pr_err("%s: RTD is NULL\n", __func__); return 0; } rc = snd_soc_new_compress(rtd, num); if (rc) pr_err("%s: Fail to create pcm for compress\n", __func__); rc = msm_compr_add_volume_control(rtd); if (rc) Loading Loading @@ -5677,6 +5685,7 @@ static int msm_compr_new(struct snd_soc_pcm_runtime *rtd) __func__); return 0; } EXPORT_SYMBOL(msm_compr_new); static struct snd_compr_ops msm_compr_ops = { .open = msm_compr_open, Loading @@ -5699,7 +5708,6 @@ static struct snd_soc_component_driver msm_soc_component = { .name = DRV_NAME, .probe = msm_compr_probe, .compr_ops = &msm_compr_ops, .pcm_new = msm_compr_new, }; static int msm_compr_dev_probe(struct platform_device *pdev) Loading asoc/msm-compress-q6-v2.h 0 → 100644 +4 −0 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* Copyright (c) 2020 The Linux Foundation. All rights reserved. */ int msm_compr_new(struct snd_soc_pcm_runtime *rtd, int num); asoc/msm-dai-fe.c +17 −15 Original line number Diff line number Diff line Loading @@ -12,6 +12,8 @@ #include <sound/pcm.h> #include <sound/soc.h> #include "msm-compress-q6-v2.h" static struct snd_soc_dai_ops msm_fe_dai_ops = {}; /* Conventional and unconventional sample rate supported */ Loading Loading @@ -222,7 +224,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia4", .probe = fe_dai_probe, }, Loading Loading @@ -308,7 +310,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia7", .probe = fe_dai_probe, }, Loading Loading @@ -2401,7 +2403,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia11", .probe = fe_dai_probe, }, Loading @@ -2421,7 +2423,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia12", .probe = fe_dai_probe, }, Loading @@ -2441,7 +2443,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia13", .probe = fe_dai_probe, }, Loading @@ -2461,7 +2463,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia14", .probe = fe_dai_probe, }, Loading @@ -2481,7 +2483,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia15", .probe = fe_dai_probe, }, Loading Loading @@ -2583,7 +2585,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia17", .probe = fe_dai_probe, }, Loading @@ -2602,7 +2604,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia18", .probe = fe_dai_probe, }, Loading @@ -2621,7 +2623,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia19", .probe = fe_dai_probe, }, Loading Loading @@ -2839,7 +2841,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia26", .probe = fe_dai_probe, }, Loading @@ -2858,7 +2860,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia27", .probe = fe_dai_probe, }, Loading @@ -2877,7 +2879,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia28", .probe = fe_dai_probe, }, Loading @@ -2896,7 +2898,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia29", .probe = fe_dai_probe, }, Loading @@ -2915,7 +2917,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia30", .probe = fe_dai_probe, }, Loading Loading
asoc/msm-compress-q6-v2.c +11 −3 Original line number Diff line number Diff line Loading @@ -5621,9 +5621,17 @@ static int msm_compr_add_channel_mixer_controls(struct snd_soc_pcm_runtime *rtd) return ret; } static int msm_compr_new(struct snd_soc_pcm_runtime *rtd) int msm_compr_new(struct snd_soc_pcm_runtime *rtd, int num) { int rc; int rc = 0; if (rtd == NULL) { pr_err("%s: RTD is NULL\n", __func__); return 0; } rc = snd_soc_new_compress(rtd, num); if (rc) pr_err("%s: Fail to create pcm for compress\n", __func__); rc = msm_compr_add_volume_control(rtd); if (rc) Loading Loading @@ -5677,6 +5685,7 @@ static int msm_compr_new(struct snd_soc_pcm_runtime *rtd) __func__); return 0; } EXPORT_SYMBOL(msm_compr_new); static struct snd_compr_ops msm_compr_ops = { .open = msm_compr_open, Loading @@ -5699,7 +5708,6 @@ static struct snd_soc_component_driver msm_soc_component = { .name = DRV_NAME, .probe = msm_compr_probe, .compr_ops = &msm_compr_ops, .pcm_new = msm_compr_new, }; static int msm_compr_dev_probe(struct platform_device *pdev) Loading
asoc/msm-compress-q6-v2.h 0 → 100644 +4 −0 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* Copyright (c) 2020 The Linux Foundation. All rights reserved. */ int msm_compr_new(struct snd_soc_pcm_runtime *rtd, int num);
asoc/msm-dai-fe.c +17 −15 Original line number Diff line number Diff line Loading @@ -12,6 +12,8 @@ #include <sound/pcm.h> #include <sound/soc.h> #include "msm-compress-q6-v2.h" static struct snd_soc_dai_ops msm_fe_dai_ops = {}; /* Conventional and unconventional sample rate supported */ Loading Loading @@ -222,7 +224,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia4", .probe = fe_dai_probe, }, Loading Loading @@ -308,7 +310,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia7", .probe = fe_dai_probe, }, Loading Loading @@ -2401,7 +2403,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia11", .probe = fe_dai_probe, }, Loading @@ -2421,7 +2423,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia12", .probe = fe_dai_probe, }, Loading @@ -2441,7 +2443,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia13", .probe = fe_dai_probe, }, Loading @@ -2461,7 +2463,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia14", .probe = fe_dai_probe, }, Loading @@ -2481,7 +2483,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia15", .probe = fe_dai_probe, }, Loading Loading @@ -2583,7 +2585,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia17", .probe = fe_dai_probe, }, Loading @@ -2602,7 +2604,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia18", .probe = fe_dai_probe, }, Loading @@ -2621,7 +2623,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia19", .probe = fe_dai_probe, }, Loading Loading @@ -2839,7 +2841,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 384000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia26", .probe = fe_dai_probe, }, Loading @@ -2858,7 +2860,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia27", .probe = fe_dai_probe, }, Loading @@ -2877,7 +2879,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia28", .probe = fe_dai_probe, }, Loading @@ -2896,7 +2898,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia29", .probe = fe_dai_probe, }, Loading @@ -2915,7 +2917,7 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rate_max = 192000, }, .ops = &msm_fe_Multimedia_dai_ops, .compress_new = snd_soc_new_compress, .compress_new = msm_compr_new, .name = "MultiMedia30", .probe = fe_dai_probe, }, Loading