Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310350
b: refs/heads/master
c: 027bdc8
h: refs/heads/master
v: v3
  • Loading branch information
Ricardo Neri authored and Tomi Valkeinen committed May 11, 2012
1 parent c700960 commit 7754d21
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9c0b8420369cb5d7fd2fea51d4705cbd0ea52743
refs/heads/master: 027bdc85ee74f8f456a47dc53154252ef7d1792f
1 change: 1 addition & 0 deletions trunk/drivers/video/omap2/dss/dss_features.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = {
#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \
defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE)
.audio_enable = ti_hdmi_4xxx_wp_audio_enable,
.audio_disable = ti_hdmi_4xxx_wp_audio_disable,
#endif

};
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/video/omap2/dss/hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,12 @@ static int hdmi_audio_trigger(struct snd_pcm_substream *substream, int cmd,
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
ip_data->ops->audio_enable(ip_data, true);
ip_data->ops->audio_enable(ip_data);
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
ip_data->ops->audio_enable(ip_data, false);
ip_data->ops->audio_disable(ip_data);
break;
default:
err = -EINVAL;
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/video/omap2/dss/ti_hdmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ struct ti_hdmi_ip_ops {

#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \
defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE)
void (*audio_enable)(struct hdmi_ip_data *ip_data, bool start);
int (*audio_enable)(struct hdmi_ip_data *ip_data);

void (*audio_disable)(struct hdmi_ip_data *ip_data);
#endif

};
Expand Down Expand Up @@ -183,6 +185,7 @@ void ti_hdmi_4xxx_core_dump(struct hdmi_ip_data *ip_data, struct seq_file *s);
void ti_hdmi_4xxx_phy_dump(struct hdmi_ip_data *ip_data, struct seq_file *s);
#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \
defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE)
void ti_hdmi_4xxx_wp_audio_enable(struct hdmi_ip_data *ip_data, bool enable);
int ti_hdmi_4xxx_wp_audio_enable(struct hdmi_ip_data *ip_data);
void ti_hdmi_4xxx_wp_audio_disable(struct hdmi_ip_data *ip_data);
#endif
#endif
19 changes: 15 additions & 4 deletions trunk/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1247,13 +1247,24 @@ int hdmi_config_audio_acr(struct hdmi_ip_data *ip_data,
return 0;
}

void ti_hdmi_4xxx_wp_audio_enable(struct hdmi_ip_data *ip_data, bool enable)
int ti_hdmi_4xxx_wp_audio_enable(struct hdmi_ip_data *ip_data)
{
REG_FLD_MOD(hdmi_av_base(ip_data),
HDMI_CORE_AV_AUD_MODE, enable, 0, 0);
HDMI_CORE_AV_AUD_MODE, true, 0, 0);
REG_FLD_MOD(hdmi_wp_base(ip_data),
HDMI_WP_AUDIO_CTRL, enable, 31, 31);
HDMI_WP_AUDIO_CTRL, true, 31, 31);
REG_FLD_MOD(hdmi_wp_base(ip_data),
HDMI_WP_AUDIO_CTRL, enable, 30, 30);
HDMI_WP_AUDIO_CTRL, true, 30, 30);
return 0;
}

void ti_hdmi_4xxx_wp_audio_disable(struct hdmi_ip_data *ip_data)
{
REG_FLD_MOD(hdmi_av_base(ip_data),
HDMI_CORE_AV_AUD_MODE, false, 0, 0);
REG_FLD_MOD(hdmi_wp_base(ip_data),
HDMI_WP_AUDIO_CTRL, false, 31, 31);
REG_FLD_MOD(hdmi_wp_base(ip_data),
HDMI_WP_AUDIO_CTRL, false, 30, 30);
}
#endif

0 comments on commit 7754d21

Please sign in to comment.