mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
ASoC: tegra: remove suport for older kernels
Support for kernel versions < kernel-4.9 is discontinued on stage-main. Thus linux version checks have to be reviewed and removed. Any code under LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) can simply be removed. This patch removes version checks and older code. Change-Id: I2df56fb9cc313a6f4328c5ec19fcab8457c65972 Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1998289 Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -408,13 +408,7 @@ static int tegra_machine_set_params(struct snd_soc_card *card,
|
|||||||
(1ULL << SNDRV_PCM_FORMAT_S32_LE) : formats;
|
(1ULL << SNDRV_PCM_FORMAT_S32_LE) : formats;
|
||||||
|
|
||||||
/* update dai link hw_params */
|
/* update dai link hw_params */
|
||||||
#if KERNEL_VERSION(4, 5, 0) > LINUX_VERSION_CODE
|
|
||||||
for (idx = 0; idx < num_of_dai_links;) {
|
|
||||||
rtd = &card->rtd[idx];
|
|
||||||
|
|
||||||
#else
|
|
||||||
list_for_each_entry(rtd, &card->rtd_list, list) {
|
list_for_each_entry(rtd, &card->rtd_list, list) {
|
||||||
#endif
|
|
||||||
if (rtd->dai_link->params) {
|
if (rtd->dai_link->params) {
|
||||||
struct snd_soc_pcm_stream *dai_params;
|
struct snd_soc_pcm_stream *dai_params;
|
||||||
|
|
||||||
@@ -702,14 +696,7 @@ static int tegra_machine_suspend_pre(struct snd_soc_card *card)
|
|||||||
struct snd_soc_pcm_runtime *rtd;
|
struct snd_soc_pcm_runtime *rtd;
|
||||||
|
|
||||||
/* DAPM dai link stream work for non pcm links */
|
/* DAPM dai link stream work for non pcm links */
|
||||||
#if KERNEL_VERSION(4, 5, 0) > LINUX_VERSION_CODE
|
|
||||||
unsigned int idx;
|
|
||||||
|
|
||||||
for (idx = 0; idx < card->num_rtd; idx++) {
|
|
||||||
rtd = &card->rtd[idx];
|
|
||||||
#else
|
|
||||||
list_for_each_entry(rtd, &card->rtd_list, list) {
|
list_for_each_entry(rtd, &card->rtd_list, list) {
|
||||||
#endif
|
|
||||||
if (rtd->dai_link->params)
|
if (rtd->dai_link->params)
|
||||||
INIT_DELAYED_WORK(&rtd->delayed_work, NULL);
|
INIT_DELAYED_WORK(&rtd->delayed_work, NULL);
|
||||||
}
|
}
|
||||||
@@ -1009,17 +996,7 @@ static const struct of_device_id tegra_machine_of_match[] = {
|
|||||||
static void __maybe_unused ignore_suspend(struct snd_soc_card *card)
|
static void __maybe_unused ignore_suspend(struct snd_soc_card *card)
|
||||||
{
|
{
|
||||||
struct snd_soc_pcm_runtime *rtd;
|
struct snd_soc_pcm_runtime *rtd;
|
||||||
#if KERNEL_VERSION(4, 5, 0) > LINUX_VERSION_CODE
|
|
||||||
struct tegra_machine *machine = snd_soc_card_get_drvdata(card);
|
|
||||||
int idx;
|
|
||||||
int num_of_dai_links = machine->soc_data->num_xbar_dai_links +
|
|
||||||
machine->num_codec_links;
|
|
||||||
|
|
||||||
for (idx = 0; idx < num_of_dai_links; idx++) {
|
|
||||||
rtd = &card->rtd[idx];
|
|
||||||
#else
|
|
||||||
list_for_each_entry(rtd, &card->rtd_list, list) {
|
list_for_each_entry(rtd, &card->rtd_list, list) {
|
||||||
#endif
|
|
||||||
rtd->dai_link->ignore_suspend = true;
|
rtd->dai_link->ignore_suspend = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3896,14 +3896,8 @@ int tegra_machine_add_i2s_codec_controls(struct snd_soc_card *card,
|
|||||||
char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
|
char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
int ret;
|
int ret;
|
||||||
#if KERNEL_VERSION(4, 5, 0) > LINUX_VERSION_CODE
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
for (i = 0; i < num_dai_links; i++) {
|
|
||||||
rtd = &card->rtd[i];
|
|
||||||
#else
|
|
||||||
list_for_each_entry(rtd, &card->rtd_list, list) {
|
list_for_each_entry(rtd, &card->rtd_list, list) {
|
||||||
#endif
|
|
||||||
np = rtd->dai_link->cpu_of_node;
|
np = rtd->dai_link->cpu_of_node;
|
||||||
|
|
||||||
if (!np)
|
if (!np)
|
||||||
|
|||||||
Reference in New Issue
Block a user