tegra210_sfc.c (db6da59cf27b5661ced03754ae0550f8914eda9e) tegra210_sfc.c (d900d9a435ca95a386f49424f3689cd17ec201da)
1// SPDX-License-Identifier: GPL-2.0-only
2//
3// tegra210_sfc.c - Tegra210 SFC driver
4//
1// SPDX-License-Identifier: GPL-2.0-only
2//
3// tegra210_sfc.c - Tegra210 SFC driver
4//
5// Copyright (c) 2021 NVIDIA CORPORATION. All rights reserved.
5// Copyright (c) 2021-2023 NVIDIA CORPORATION. All rights reserved.
6
7#include <linux/clk.h>
8#include <linux/device.h>
9#include <linux/io.h>
10#include <linux/module.h>
11#include <linux/of.h>
12#include <linux/of_device.h>
13#include <linux/platform_device.h>

--- 23 unchanged lines hidden (view full) ---

37 8000,
38 11025,
39 16000,
40 22050,
41 24000,
42 32000,
43 44100,
44 48000,
6
7#include <linux/clk.h>
8#include <linux/device.h>
9#include <linux/io.h>
10#include <linux/module.h>
11#include <linux/of.h>
12#include <linux/of_device.h>
13#include <linux/platform_device.h>

--- 23 unchanged lines hidden (view full) ---

37 8000,
38 11025,
39 16000,
40 22050,
41 24000,
42 32000,
43 44100,
44 48000,
45 64000,
45 88200,
46 96000,
47 176400,
48 192000,
49};
50
51/* coeff RAM tables required for SFC */
52static u32 coef_8to11[TEGRA210_SFC_COEF_RAM_DEPTH] = {

--- 2799 unchanged lines hidden (view full) ---

2852 BYPASS_CONV,
2853 coef_8to11,
2854 coef_8to16,
2855 coef_8to22,
2856 coef_8to24,
2857 coef_8to32,
2858 coef_8to44,
2859 coef_8to48,
46 88200,
47 96000,
48 176400,
49 192000,
50};
51
52/* coeff RAM tables required for SFC */
53static u32 coef_8to11[TEGRA210_SFC_COEF_RAM_DEPTH] = {

--- 2799 unchanged lines hidden (view full) ---

2853 BYPASS_CONV,
2854 coef_8to11,
2855 coef_8to16,
2856 coef_8to22,
2857 coef_8to24,
2858 coef_8to32,
2859 coef_8to44,
2860 coef_8to48,
2861 UNSUPP_CONV,
2860 coef_8to88,
2861 coef_8to96,
2862 UNSUPP_CONV,
2863 UNSUPP_CONV,
2864 },
2865 /* Convertions from 11.025 kHz */
2866 {
2867 coef_11to8,
2868 BYPASS_CONV,
2869 coef_11to16,
2870 coef_11to22,
2871 coef_11to24,
2872 coef_11to32,
2873 coef_11to44,
2874 coef_11to48,
2862 coef_8to88,
2863 coef_8to96,
2864 UNSUPP_CONV,
2865 UNSUPP_CONV,
2866 },
2867 /* Convertions from 11.025 kHz */
2868 {
2869 coef_11to8,
2870 BYPASS_CONV,
2871 coef_11to16,
2872 coef_11to22,
2873 coef_11to24,
2874 coef_11to32,
2875 coef_11to44,
2876 coef_11to48,
2877 UNSUPP_CONV,
2875 coef_11to88,
2876 coef_11to96,
2877 UNSUPP_CONV,
2878 UNSUPP_CONV,
2879 },
2880 /* Convertions from 16 kHz */
2881 {
2882 coef_16to8,
2883 coef_16to11,
2884 BYPASS_CONV,
2885 coef_16to22,
2886 coef_16to24,
2887 coef_16to32,
2888 coef_16to44,
2889 coef_16to48,
2878 coef_11to88,
2879 coef_11to96,
2880 UNSUPP_CONV,
2881 UNSUPP_CONV,
2882 },
2883 /* Convertions from 16 kHz */
2884 {
2885 coef_16to8,
2886 coef_16to11,
2887 BYPASS_CONV,
2888 coef_16to22,
2889 coef_16to24,
2890 coef_16to32,
2891 coef_16to44,
2892 coef_16to48,
2893 UNSUPP_CONV,
2890 coef_16to88,
2891 coef_16to96,
2892 coef_16to176,
2893 coef_16to192,
2894 },
2895 /* Convertions from 22.05 kHz */
2896 {
2897 coef_22to8,
2898 coef_22to11,
2899 coef_22to16,
2900 BYPASS_CONV,
2901 coef_22to24,
2902 coef_22to32,
2903 coef_22to44,
2904 coef_22to48,
2894 coef_16to88,
2895 coef_16to96,
2896 coef_16to176,
2897 coef_16to192,
2898 },
2899 /* Convertions from 22.05 kHz */
2900 {
2901 coef_22to8,
2902 coef_22to11,
2903 coef_22to16,
2904 BYPASS_CONV,
2905 coef_22to24,
2906 coef_22to32,
2907 coef_22to44,
2908 coef_22to48,
2909 UNSUPP_CONV,
2905 coef_22to88,
2906 coef_22to96,
2907 coef_22to176,
2908 coef_22to192,
2909 },
2910 /* Convertions from 24 kHz */
2911 {
2912 coef_24to8,
2913 coef_24to11,
2914 coef_24to16,
2915 coef_24to22,
2916 BYPASS_CONV,
2917 coef_24to32,
2918 coef_24to44,
2919 coef_24to48,
2910 coef_22to88,
2911 coef_22to96,
2912 coef_22to176,
2913 coef_22to192,
2914 },
2915 /* Convertions from 24 kHz */
2916 {
2917 coef_24to8,
2918 coef_24to11,
2919 coef_24to16,
2920 coef_24to22,
2921 BYPASS_CONV,
2922 coef_24to32,
2923 coef_24to44,
2924 coef_24to48,
2925 UNSUPP_CONV,
2920 coef_24to88,
2921 coef_24to96,
2922 coef_24to176,
2923 coef_24to192,
2924 },
2925 /* Convertions from 32 kHz */
2926 {
2927 coef_32to8,
2928 coef_32to11,
2929 coef_32to16,
2930 coef_32to22,
2931 coef_32to24,
2932 BYPASS_CONV,
2933 coef_32to44,
2934 coef_32to48,
2926 coef_24to88,
2927 coef_24to96,
2928 coef_24to176,
2929 coef_24to192,
2930 },
2931 /* Convertions from 32 kHz */
2932 {
2933 coef_32to8,
2934 coef_32to11,
2935 coef_32to16,
2936 coef_32to22,
2937 coef_32to24,
2938 BYPASS_CONV,
2939 coef_32to44,
2940 coef_32to48,
2941 UNSUPP_CONV,
2935 coef_32to88,
2936 coef_32to96,
2937 coef_32to176,
2938 coef_32to192,
2939 },
2940 /* Convertions from 44.1 kHz */
2941 {
2942 coef_44to8,
2943 coef_44to11,
2944 coef_44to16,
2945 coef_44to22,
2946 coef_44to24,
2947 coef_44to32,
2948 BYPASS_CONV,
2949 coef_44to48,
2942 coef_32to88,
2943 coef_32to96,
2944 coef_32to176,
2945 coef_32to192,
2946 },
2947 /* Convertions from 44.1 kHz */
2948 {
2949 coef_44to8,
2950 coef_44to11,
2951 coef_44to16,
2952 coef_44to22,
2953 coef_44to24,
2954 coef_44to32,
2955 BYPASS_CONV,
2956 coef_44to48,
2957 UNSUPP_CONV,
2950 coef_44to88,
2951 coef_44to96,
2952 coef_44to176,
2953 coef_44to192,
2954 },
2955 /* Convertions from 48 kHz */
2956 {
2957 coef_48to8,
2958 coef_48to11,
2959 coef_48to16,
2960 coef_48to22,
2961 coef_48to24,
2962 coef_48to32,
2963 coef_48to44,
2964 BYPASS_CONV,
2958 coef_44to88,
2959 coef_44to96,
2960 coef_44to176,
2961 coef_44to192,
2962 },
2963 /* Convertions from 48 kHz */
2964 {
2965 coef_48to8,
2966 coef_48to11,
2967 coef_48to16,
2968 coef_48to22,
2969 coef_48to24,
2970 coef_48to32,
2971 coef_48to44,
2972 BYPASS_CONV,
2973 UNSUPP_CONV,
2965 coef_48to88,
2966 coef_48to96,
2967 coef_48to176,
2968 coef_48to192,
2969 },
2974 coef_48to88,
2975 coef_48to96,
2976 coef_48to176,
2977 coef_48to192,
2978 },
2979 /* Convertions from 64 kHz */
2980 {
2981 UNSUPP_CONV,
2982 UNSUPP_CONV,
2983 UNSUPP_CONV,
2984 UNSUPP_CONV,
2985 UNSUPP_CONV,
2986 UNSUPP_CONV,
2987 UNSUPP_CONV,
2988 UNSUPP_CONV,
2989 UNSUPP_CONV,
2990 UNSUPP_CONV,
2991 UNSUPP_CONV,
2992 UNSUPP_CONV,
2993 UNSUPP_CONV,
2994 },
2970 /* Convertions from 88.2 kHz */
2971 {
2972 coef_88to8,
2973 coef_88to11,
2974 coef_88to16,
2975 coef_88to22,
2976 coef_88to24,
2977 coef_88to32,
2978 coef_88to44,
2979 coef_88to48,
2995 /* Convertions from 88.2 kHz */
2996 {
2997 coef_88to8,
2998 coef_88to11,
2999 coef_88to16,
3000 coef_88to22,
3001 coef_88to24,
3002 coef_88to32,
3003 coef_88to44,
3004 coef_88to48,
3005 UNSUPP_CONV,
2980 BYPASS_CONV,
2981 coef_88to96,
2982 coef_88to176,
2983 coef_88to192,
2984 },
2985 /* Convertions from 96 kHz */
2986 { coef_96to8,
2987 coef_96to11,
2988 coef_96to16,
2989 coef_96to22,
2990 coef_96to24,
2991 coef_96to32,
2992 coef_96to44,
2993 coef_96to48,
3006 BYPASS_CONV,
3007 coef_88to96,
3008 coef_88to176,
3009 coef_88to192,
3010 },
3011 /* Convertions from 96 kHz */
3012 { coef_96to8,
3013 coef_96to11,
3014 coef_96to16,
3015 coef_96to22,
3016 coef_96to24,
3017 coef_96to32,
3018 coef_96to44,
3019 coef_96to48,
3020 UNSUPP_CONV,
2994 coef_96to88,
2995 BYPASS_CONV,
2996 coef_96to176,
2997 coef_96to192,
2998 },
2999 /* Convertions from 176.4 kHz */
3000 {
3001 UNSUPP_CONV,
3002 UNSUPP_CONV,
3003 coef_176to16,
3004 coef_176to22,
3005 coef_176to24,
3006 coef_176to32,
3007 coef_176to44,
3008 coef_176to48,
3021 coef_96to88,
3022 BYPASS_CONV,
3023 coef_96to176,
3024 coef_96to192,
3025 },
3026 /* Convertions from 176.4 kHz */
3027 {
3028 UNSUPP_CONV,
3029 UNSUPP_CONV,
3030 coef_176to16,
3031 coef_176to22,
3032 coef_176to24,
3033 coef_176to32,
3034 coef_176to44,
3035 coef_176to48,
3036 UNSUPP_CONV,
3009 coef_176to88,
3010 coef_176to96,
3011 BYPASS_CONV,
3012 coef_176to192,
3013 },
3014 /* Convertions from 192 kHz */
3015 {
3016 UNSUPP_CONV,
3017 UNSUPP_CONV,
3018 coef_192to16,
3019 coef_192to22,
3020 coef_192to24,
3021 coef_192to32,
3022 coef_192to44,
3023 coef_192to48,
3037 coef_176to88,
3038 coef_176to96,
3039 BYPASS_CONV,
3040 coef_176to192,
3041 },
3042 /* Convertions from 192 kHz */
3043 {
3044 UNSUPP_CONV,
3045 UNSUPP_CONV,
3046 coef_192to16,
3047 coef_192to22,
3048 coef_192to24,
3049 coef_192to32,
3050 coef_192to44,
3051 coef_192to48,
3052 UNSUPP_CONV,
3024 coef_192to88,
3025 coef_192to96,
3026 coef_192to176,
3027 BYPASS_CONV,
3028 },
3029};
3030
3031static int __maybe_unused tegra210_sfc_runtime_suspend(struct device *dev)

--- 581 unchanged lines hidden ---
3053 coef_192to88,
3054 coef_192to96,
3055 coef_192to176,
3056 BYPASS_CONV,
3057 },
3058};
3059
3060static int __maybe_unused tegra210_sfc_runtime_suspend(struct device *dev)

--- 581 unchanged lines hidden ---