Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

OMAPDSS: Remove all references to obsolete HDMI audio callbacks

In new model these callbacks are obsolete since the ASoC component
drivers are integrated into the HDMI drivers and no callbacks are
needed anymore.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Jyri Sarha and committed by
Tomi Valkeinen
84a845de ab387c1e

-195
-99
drivers/video/fbdev/omap2/displays-new/connector-hdmi.c
··· 170 170 return in->ops.hdmi->detect(in); 171 171 } 172 172 173 - static int hdmic_audio_enable(struct omap_dss_device *dssdev) 174 - { 175 - struct panel_drv_data *ddata = to_panel_data(dssdev); 176 - struct omap_dss_device *in = ddata->in; 177 - int r; 178 - 179 - /* enable audio only if the display is active */ 180 - if (!omapdss_device_is_enabled(dssdev)) 181 - return -EPERM; 182 - 183 - r = in->ops.hdmi->audio_enable(in); 184 - if (r) 185 - return r; 186 - 187 - dssdev->audio_state = OMAP_DSS_AUDIO_ENABLED; 188 - 189 - return 0; 190 - } 191 - 192 - static void hdmic_audio_disable(struct omap_dss_device *dssdev) 193 - { 194 - struct panel_drv_data *ddata = to_panel_data(dssdev); 195 - struct omap_dss_device *in = ddata->in; 196 - 197 - in->ops.hdmi->audio_disable(in); 198 - 199 - dssdev->audio_state = OMAP_DSS_AUDIO_DISABLED; 200 - } 201 - 202 - static int hdmic_audio_start(struct omap_dss_device *dssdev) 203 - { 204 - struct panel_drv_data *ddata = to_panel_data(dssdev); 205 - struct omap_dss_device *in = ddata->in; 206 - int r; 207 - 208 - /* 209 - * No need to check the panel state. It was checked when trasitioning 210 - * to AUDIO_ENABLED. 211 - */ 212 - if (dssdev->audio_state != OMAP_DSS_AUDIO_ENABLED) 213 - return -EPERM; 214 - 215 - r = in->ops.hdmi->audio_start(in); 216 - if (r) 217 - return r; 218 - 219 - dssdev->audio_state = OMAP_DSS_AUDIO_PLAYING; 220 - 221 - return 0; 222 - } 223 - 224 - static void hdmic_audio_stop(struct omap_dss_device *dssdev) 225 - { 226 - struct panel_drv_data *ddata = to_panel_data(dssdev); 227 - struct omap_dss_device *in = ddata->in; 228 - 229 - in->ops.hdmi->audio_stop(in); 230 - 231 - dssdev->audio_state = OMAP_DSS_AUDIO_ENABLED; 232 - } 233 - 234 - static bool hdmic_audio_supported(struct omap_dss_device *dssdev) 235 - { 236 - struct panel_drv_data *ddata = to_panel_data(dssdev); 237 - struct omap_dss_device *in = ddata->in; 238 - 239 - if (!omapdss_device_is_enabled(dssdev)) 240 - return false; 241 - 242 - return in->ops.hdmi->audio_supported(in); 243 - } 244 - 245 - static int hdmic_audio_config(struct omap_dss_device *dssdev, 246 - struct omap_dss_audio *audio) 247 - { 248 - struct panel_drv_data *ddata = to_panel_data(dssdev); 249 - struct omap_dss_device *in = ddata->in; 250 - int r; 251 - 252 - /* config audio only if the display is active */ 253 - if (!omapdss_device_is_enabled(dssdev)) 254 - return -EPERM; 255 - 256 - r = in->ops.hdmi->audio_config(in, audio); 257 - if (r) 258 - return r; 259 - 260 - dssdev->audio_state = OMAP_DSS_AUDIO_CONFIGURED; 261 - 262 - return 0; 263 - } 264 - 265 173 static int hdmic_set_hdmi_mode(struct omap_dss_device *dssdev, bool hdmi_mode) 266 174 { 267 175 struct panel_drv_data *ddata = to_panel_data(dssdev); ··· 204 296 .detect = hdmic_detect, 205 297 .set_hdmi_mode = hdmic_set_hdmi_mode, 206 298 .set_hdmi_infoframe = hdmic_set_infoframe, 207 - 208 - .audio_enable = hdmic_audio_enable, 209 - .audio_disable = hdmic_audio_disable, 210 - .audio_start = hdmic_audio_start, 211 - .audio_stop = hdmic_audio_stop, 212 - .audio_supported = hdmic_audio_supported, 213 - .audio_config = hdmic_audio_config, 214 299 }; 215 300 216 301 static int hdmic_probe_pdata(struct platform_device *pdev)
-56
drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
··· 193 193 return gpio_get_value_cansleep(ddata->hpd_gpio); 194 194 } 195 195 196 - static int tpd_audio_enable(struct omap_dss_device *dssdev) 197 - { 198 - struct panel_drv_data *ddata = to_panel_data(dssdev); 199 - struct omap_dss_device *in = ddata->in; 200 - 201 - return in->ops.hdmi->audio_enable(in); 202 - } 203 - 204 - static void tpd_audio_disable(struct omap_dss_device *dssdev) 205 - { 206 - struct panel_drv_data *ddata = to_panel_data(dssdev); 207 - struct omap_dss_device *in = ddata->in; 208 - 209 - in->ops.hdmi->audio_disable(in); 210 - } 211 - 212 - static int tpd_audio_start(struct omap_dss_device *dssdev) 213 - { 214 - struct panel_drv_data *ddata = to_panel_data(dssdev); 215 - struct omap_dss_device *in = ddata->in; 216 - 217 - return in->ops.hdmi->audio_start(in); 218 - } 219 - 220 - static void tpd_audio_stop(struct omap_dss_device *dssdev) 221 - { 222 - struct panel_drv_data *ddata = to_panel_data(dssdev); 223 - struct omap_dss_device *in = ddata->in; 224 - 225 - in->ops.hdmi->audio_stop(in); 226 - } 227 - 228 - static bool tpd_audio_supported(struct omap_dss_device *dssdev) 229 - { 230 - struct panel_drv_data *ddata = to_panel_data(dssdev); 231 - struct omap_dss_device *in = ddata->in; 232 - 233 - return in->ops.hdmi->audio_supported(in); 234 - } 235 - 236 - static int tpd_audio_config(struct omap_dss_device *dssdev, 237 - struct omap_dss_audio *audio) 238 - { 239 - struct panel_drv_data *ddata = to_panel_data(dssdev); 240 - struct omap_dss_device *in = ddata->in; 241 - 242 - return in->ops.hdmi->audio_config(in, audio); 243 - } 244 - 245 196 static int tpd_set_infoframe(struct omap_dss_device *dssdev, 246 197 const struct hdmi_avi_infoframe *avi) 247 198 { ··· 226 275 .detect = tpd_detect, 227 276 .set_infoframe = tpd_set_infoframe, 228 277 .set_hdmi_mode = tpd_set_hdmi_mode, 229 - 230 - .audio_enable = tpd_audio_enable, 231 - .audio_disable = tpd_audio_disable, 232 - .audio_start = tpd_audio_start, 233 - .audio_stop = tpd_audio_stop, 234 - .audio_supported = tpd_audio_supported, 235 - .audio_config = tpd_audio_config, 236 278 }; 237 279 238 280 static int tpd_probe_pdata(struct platform_device *pdev)
-40
include/video/omapdss.h
··· 166 166 OMAP_DSS_DISPLAY_ACTIVE, 167 167 }; 168 168 169 - enum omap_dss_audio_state { 170 - OMAP_DSS_AUDIO_DISABLED = 0, 171 - OMAP_DSS_AUDIO_ENABLED, 172 - OMAP_DSS_AUDIO_CONFIGURED, 173 - OMAP_DSS_AUDIO_PLAYING, 174 - }; 175 - 176 169 struct omap_dss_audio { 177 170 struct snd_aes_iec958 *iec; 178 171 struct snd_cea_861_aud_if *cea; ··· 628 635 int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode); 629 636 int (*set_infoframe)(struct omap_dss_device *dssdev, 630 637 const struct hdmi_avi_infoframe *avi); 631 - 632 - /* 633 - * Note: These functions might sleep. Do not call while 634 - * holding a spinlock/readlock. 635 - */ 636 - int (*audio_enable)(struct omap_dss_device *dssdev); 637 - void (*audio_disable)(struct omap_dss_device *dssdev); 638 - bool (*audio_supported)(struct omap_dss_device *dssdev); 639 - int (*audio_config)(struct omap_dss_device *dssdev, 640 - struct omap_dss_audio *audio); 641 - /* Note: These functions may not sleep */ 642 - int (*audio_start)(struct omap_dss_device *dssdev); 643 - void (*audio_stop)(struct omap_dss_device *dssdev); 644 638 }; 645 639 646 640 struct omapdss_dsi_ops { ··· 763 783 764 784 enum omap_dss_display_state state; 765 785 766 - enum omap_dss_audio_state audio_state; 767 - 768 786 /* OMAP DSS output specific fields */ 769 787 770 788 struct list_head list; ··· 839 861 int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode); 840 862 int (*set_hdmi_infoframe)(struct omap_dss_device *dssdev, 841 863 const struct hdmi_avi_infoframe *avi); 842 - 843 - /* 844 - * For display drivers that support audio. This encompasses 845 - * HDMI and DisplayPort at the moment. 846 - */ 847 - /* 848 - * Note: These functions might sleep. Do not call while 849 - * holding a spinlock/readlock. 850 - */ 851 - int (*audio_enable)(struct omap_dss_device *dssdev); 852 - void (*audio_disable)(struct omap_dss_device *dssdev); 853 - bool (*audio_supported)(struct omap_dss_device *dssdev); 854 - int (*audio_config)(struct omap_dss_device *dssdev, 855 - struct omap_dss_audio *audio); 856 - /* Note: These functions may not sleep */ 857 - int (*audio_start)(struct omap_dss_device *dssdev); 858 - void (*audio_stop)(struct omap_dss_device *dssdev); 859 - 860 864 }; 861 865 862 866 enum omapdss_version omapdss_get_version(void);