Merge "ARM: dts: msm: rename codec child node of MSM external display"
This commit is contained in:
commit
8afddead2b
12 changed files with 485 additions and 170 deletions
|
@ -53,23 +53,29 @@ Optional properties:
|
||||||
- "secondary"
|
- "secondary"
|
||||||
- "tertiary"
|
- "tertiary"
|
||||||
|
|
||||||
[Optional child nodes]: These nodes are for devices which are
|
|
||||||
dependent on HDMI Tx controller. If HDMI Tx controller is disabled then
|
|
||||||
these devices will be disabled as well. Ex. HDMI Audio Codec device.
|
|
||||||
|
|
||||||
- qcom,msm-hdmi-audio-rx: Node for HDMI audio codec.
|
|
||||||
Required properties:
|
|
||||||
- compatible : "msm-hdmi-audio-codec-rx";
|
|
||||||
|
|
||||||
msm_ext_disp is a device which manages the interaction between external
|
msm_ext_disp is a device which manages the interaction between external
|
||||||
displays (HDMI and Display Port) and the audio and display frameworks.
|
displays (HDMI and Display Port) and the audio and display frameworks.
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible: Must be "qcom,msm-ext-disp"
|
- compatible: Must be "qcom,msm-ext-disp"
|
||||||
|
|
||||||
|
[Required child nodes]: These nodes are for devices which are
|
||||||
|
dependent on msm_ext_disp. If msm_ext_disp is disabled then
|
||||||
|
these devices will be disabled as well. Ex. Audio Codec device.
|
||||||
|
|
||||||
|
- ext_disp_audio_codec: Node for Audio Codec.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "qcom,msm-ext-disp-audio-codec-rx";
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
msm_ext_disp: qcom,msm_ext_disp {
|
msm_ext_disp: qcom,msm_ext_disp {
|
||||||
compatible = "qcom,msm-ext-disp";
|
compatible = "qcom,msm-ext-disp";
|
||||||
|
|
||||||
|
ext_disp_audio_codec: qcom,msm-ext-disp-audio-codec-rx {
|
||||||
|
compatible = "qcom,msm-ext-disp-audio-codec-rx";
|
||||||
|
qcom,msm_ext_disp = <&msm_ext_disp>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
mdss_hdmi_tx: qcom,hdmi_tx@fd922100 {
|
mdss_hdmi_tx: qcom,hdmi_tx@fd922100 {
|
||||||
|
@ -109,9 +115,6 @@ Example:
|
||||||
qcom,pluggable;
|
qcom,pluggable;
|
||||||
qcom,display-id = "secondary";
|
qcom,display-id = "secondary";
|
||||||
|
|
||||||
qcom,msm-hdmi-audio-rx {
|
|
||||||
compatible = "qcom,msm-hdmi-audio-codec-rx";
|
|
||||||
};
|
|
||||||
pinctrl-names = "hdmi_hpd_active", "hdmi_ddc_active",
|
pinctrl-names = "hdmi_hpd_active", "hdmi_ddc_active",
|
||||||
"hdmi_cec_active", "hdmi_active",
|
"hdmi_cec_active", "hdmi_active",
|
||||||
"hdmi_sleep";
|
"hdmi_sleep";
|
||||||
|
|
|
@ -470,6 +470,11 @@ Example:
|
||||||
qcom,msm-dai-q6-dev-id = <8>;
|
qcom,msm-dai-q6-dev-id = <8>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dai_dp: qcom,msm-dai-q6-dp {
|
||||||
|
compatible = "qcom,msm-dai-q6-hdmi";
|
||||||
|
qcom,msm-dai-q6-dev-id = <24608>;
|
||||||
|
};
|
||||||
|
|
||||||
qcom,msm-dai-q6 {
|
qcom,msm-dai-q6 {
|
||||||
compatible = "qcom,msm-dai-q6";
|
compatible = "qcom,msm-dai-q6";
|
||||||
qcom,msm-dai-q6-sb-0-rx {
|
qcom,msm-dai-q6-sb-0-rx {
|
||||||
|
@ -784,7 +789,7 @@ Example:
|
||||||
"msm-voip-dsp", "msm-pcm-voice", "msm-pcm-loopback",
|
"msm-voip-dsp", "msm-pcm-voice", "msm-pcm-loopback",
|
||||||
"msm-compress-dsp", "msm-pcm-hostless", "msm-pcm-afe",
|
"msm-compress-dsp", "msm-pcm-hostless", "msm-pcm-afe",
|
||||||
"msm-lsm-client", "msm-pcm-routing", "msm-pcm-lpa";
|
"msm-lsm-client", "msm-pcm-routing", "msm-pcm-lpa";
|
||||||
asoc-cpu = <&dai_pri_auxpcm>, <&dai_hdmi>,
|
asoc-cpu = <&dai_pri_auxpcm>, <&dai_hdmi>, <&dai_dp>,
|
||||||
<&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>, <&dai_mi2s3>,
|
<&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>, <&dai_mi2s3>,
|
||||||
<&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>,
|
<&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>,
|
||||||
<&sb_3_rx>, <&sb_3_tx>, <&sb_4_rx>, <&sb_4_tx>,
|
<&sb_3_rx>, <&sb_3_tx>, <&sb_4_rx>, <&sb_4_tx>,
|
||||||
|
@ -793,6 +798,7 @@ Example:
|
||||||
<&incall_record_rx>, <&incall_record_tx>, <&incall_music_rx>,
|
<&incall_record_rx>, <&incall_record_tx>, <&incall_music_rx>,
|
||||||
<&incall_music_2_rx>;
|
<&incall_music_2_rx>;
|
||||||
asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-hdmi.8",
|
asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-hdmi.8",
|
||||||
|
"msm-dai-q6-dp.24608",
|
||||||
"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
|
"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
|
||||||
"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
|
"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
|
||||||
"msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385",
|
"msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385",
|
||||||
|
@ -1157,7 +1163,7 @@ Example:
|
||||||
<&bt_sco_tx>,<&int_fm_rx>,<&int_fm_tx>,<&afe_pcm_rx>,
|
<&bt_sco_tx>,<&int_fm_rx>,<&int_fm_tx>,<&afe_pcm_rx>,
|
||||||
<&afe_pcm_tx>,<&afe_proxy_rx>,<&afe_proxy_tx>,
|
<&afe_pcm_tx>,<&afe_proxy_rx>,<&afe_proxy_tx>,
|
||||||
<&incall_record_rx>,<&incall_record_tx>,<&incall_music_rx>,
|
<&incall_record_rx>,<&incall_record_tx>,<&incall_music_rx>,
|
||||||
<&incall_music2_rx>;
|
<&incall_music2_rx>,<&dai_dp>;
|
||||||
asoc-cpu-names = "msm-dai-q6-auxpcm.1","msm-dai-q6-auxpcm.2",
|
asoc-cpu-names = "msm-dai-q6-auxpcm.1","msm-dai-q6-auxpcm.2",
|
||||||
"msm-dai-q6-hdmi.8","msm-dai-q6-mi2s.0",
|
"msm-dai-q6-hdmi.8","msm-dai-q6-mi2s.0",
|
||||||
"msm-dai-q6-dev.16384","msm-dai-q6-dev.16385",
|
"msm-dai-q6-dev.16384","msm-dai-q6-dev.16385",
|
||||||
|
@ -1171,7 +1177,7 @@ Example:
|
||||||
"msm-dai-q6-dev.225","msm-dai-q6-dev.241",
|
"msm-dai-q6-dev.225","msm-dai-q6-dev.241",
|
||||||
"msm-dai-q6-dev.240","msm-dai-q6-dev.32771",
|
"msm-dai-q6-dev.240","msm-dai-q6-dev.32771",
|
||||||
"msm-dai-q6-dev.32772","msm-dai-q6-dev.32773",
|
"msm-dai-q6-dev.32772","msm-dai-q6-dev.32773",
|
||||||
"msm-dai-q6-dev.32770";
|
"msm-dai-q6-dev.32770","msm-dai-q6-dp.24608";
|
||||||
asoc-codec = <&stub>;
|
asoc-codec = <&stub>;
|
||||||
asoc-codec-names = "msm-stub-codec.1";
|
asoc-codec-names = "msm-stub-codec.1";
|
||||||
};
|
};
|
||||||
|
|
|
@ -104,9 +104,9 @@
|
||||||
"msm-dai-q6-dev.16396", "msm-dai-q6-dev.16398",
|
"msm-dai-q6-dev.16396", "msm-dai-q6-dev.16398",
|
||||||
"msm-dai-q6-dev.16399", "msm-dai-q6-dev.16401",
|
"msm-dai-q6-dev.16399", "msm-dai-q6-dev.16401",
|
||||||
"msm-dai-q6-dev.28672", "msm-dai-q6-dev.28673";
|
"msm-dai-q6-dev.28672", "msm-dai-q6-dev.28673";
|
||||||
asoc-codec = <&stub_codec>, <&hdmi_audio>;
|
asoc-codec = <&stub_codec>, <&ext_disp_audio_codec>;
|
||||||
asoc-codec-names = "msm-stub-codec.1",
|
asoc-codec-names = "msm-stub-codec.1",
|
||||||
"msm-hdmi-audio-codec-rx";
|
"msm-ext-disp-audio-codec-rx";
|
||||||
qcom,wsa-max-devs = <2>;
|
qcom,wsa-max-devs = <2>;
|
||||||
qcom,wsa-devs = <&wsa881x_211>, <&wsa881x_212>,
|
qcom,wsa-devs = <&wsa881x_211>, <&wsa881x_212>,
|
||||||
<&wsa881x_213>, <&wsa881x_214>;
|
<&wsa881x_213>, <&wsa881x_214>;
|
||||||
|
@ -182,8 +182,9 @@
|
||||||
"msm-dai-q6-dev.32770", "msm-dai-q6-dev.16394",
|
"msm-dai-q6-dev.32770", "msm-dai-q6-dev.16394",
|
||||||
"msm-dai-q6-dev.28672", "msm-dai-q6-dev.28673",
|
"msm-dai-q6-dev.28672", "msm-dai-q6-dev.28673",
|
||||||
"msm-dai-q6-dev.16396";
|
"msm-dai-q6-dev.16396";
|
||||||
asoc-codec = <&stub_codec>;
|
asoc-codec = <&stub_codec>, <&ext_disp_audio_codec>;
|
||||||
asoc-codec-names = "msm-stub-codec.1";
|
asoc-codec-names = "msm-stub-codec.1",
|
||||||
|
"msm-ext-disp-audio-codec-rx";
|
||||||
qcom,wsa-max-devs = <2>;
|
qcom,wsa-max-devs = <2>;
|
||||||
qcom,wsa-devs = <&wsa881x_0211>, <&wsa881x_0212>,
|
qcom,wsa-devs = <&wsa881x_0211>, <&wsa881x_0212>,
|
||||||
<&wsa881x_0213>, <&wsa881x_0214>;
|
<&wsa881x_0213>, <&wsa881x_0214>;
|
||||||
|
|
|
@ -451,8 +451,9 @@
|
||||||
msm_ext_disp: qcom,msm_ext_disp {
|
msm_ext_disp: qcom,msm_ext_disp {
|
||||||
compatible = "qcom,msm-ext-disp";
|
compatible = "qcom,msm-ext-disp";
|
||||||
|
|
||||||
hdmi_audio: qcom,msm-hdmi-audio-rx {
|
ext_disp_audio_codec: qcom,msm-ext-disp-audio-codec-rx {
|
||||||
compatible = "qcom,msm-hdmi-audio-codec-rx";
|
compatible = "qcom,msm-ext-disp-audio-codec-rx";
|
||||||
|
qcom,msm_ext_disp = <&msm_ext_disp>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -804,6 +804,7 @@ struct adm_cmd_connect_afe_port_v5 {
|
||||||
#define INT_FM_TX 0x3005
|
#define INT_FM_TX 0x3005
|
||||||
#define RT_PROXY_PORT_001_RX 0x2000
|
#define RT_PROXY_PORT_001_RX 0x2000
|
||||||
#define RT_PROXY_PORT_001_TX 0x2001
|
#define RT_PROXY_PORT_001_TX 0x2001
|
||||||
|
#define DISPLAY_PORT_RX 0x6020
|
||||||
|
|
||||||
#define AFE_PORT_INVALID 0xFFFF
|
#define AFE_PORT_INVALID 0xFFFF
|
||||||
#define SLIMBUS_INVALID AFE_PORT_INVALID
|
#define SLIMBUS_INVALID AFE_PORT_INVALID
|
||||||
|
@ -953,6 +954,8 @@ struct adm_cmd_connect_afe_port_v5 {
|
||||||
#define AFE_PORT_ID_SLIMBUS_MULTI_CHAN_8_RX 0x4010
|
#define AFE_PORT_ID_SLIMBUS_MULTI_CHAN_8_RX 0x4010
|
||||||
/* SLIMbus Tx port on channel 8. */
|
/* SLIMbus Tx port on channel 8. */
|
||||||
#define AFE_PORT_ID_SLIMBUS_MULTI_CHAN_8_TX 0x4011
|
#define AFE_PORT_ID_SLIMBUS_MULTI_CHAN_8_TX 0x4011
|
||||||
|
/* AFE Rx port for audio over Display port */
|
||||||
|
#define AFE_PORT_ID_HDMI_OVER_DP_RX 0x6020
|
||||||
/*USB AFE port */
|
/*USB AFE port */
|
||||||
#define AFE_PORT_ID_USB_RX 0x7000
|
#define AFE_PORT_ID_USB_RX 0x7000
|
||||||
#define AFE_PORT_ID_USB_TX 0x7001
|
#define AFE_PORT_ID_USB_TX 0x7001
|
||||||
|
|
|
@ -173,14 +173,16 @@ enum {
|
||||||
IDX_AFE_PORT_ID_QUATERNARY_TDM_TX_6,
|
IDX_AFE_PORT_ID_QUATERNARY_TDM_TX_6,
|
||||||
IDX_AFE_PORT_ID_QUATERNARY_TDM_RX_7,
|
IDX_AFE_PORT_ID_QUATERNARY_TDM_RX_7,
|
||||||
IDX_AFE_PORT_ID_QUATERNARY_TDM_TX_7,
|
IDX_AFE_PORT_ID_QUATERNARY_TDM_TX_7,
|
||||||
/* IDX 118->122 */
|
/* IDX 118->121 */
|
||||||
IDX_SLIMBUS_7_RX,
|
IDX_SLIMBUS_7_RX,
|
||||||
IDX_SLIMBUS_7_TX,
|
IDX_SLIMBUS_7_TX,
|
||||||
IDX_SLIMBUS_8_RX,
|
IDX_SLIMBUS_8_RX,
|
||||||
IDX_SLIMBUS_8_TX,
|
IDX_SLIMBUS_8_TX,
|
||||||
/* IDX 123-> 124 */
|
/* IDX 122-> 123 */
|
||||||
IDX_AFE_PORT_ID_USB_RX,
|
IDX_AFE_PORT_ID_USB_RX,
|
||||||
IDX_AFE_PORT_ID_USB_TX,
|
IDX_AFE_PORT_ID_USB_TX,
|
||||||
|
/* IDX 124 */
|
||||||
|
IDX_DISPLAY_PORT_RX,
|
||||||
AFE_MAX_PORTS
|
AFE_MAX_PORTS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
338
sound/soc/codecs/msm_hdmi_codec_rx.c
Executable file → Normal file
338
sound/soc/codecs/msm_hdmi_codec_rx.c
Executable file → Normal file
|
@ -19,115 +19,208 @@
|
||||||
#include <sound/soc.h>
|
#include <sound/soc.h>
|
||||||
#include <linux/msm_ext_display.h>
|
#include <linux/msm_ext_display.h>
|
||||||
|
|
||||||
#define MSM_HDMI_PCM_RATES SNDRV_PCM_RATE_48000
|
#define MSM_EXT_DISP_PCM_RATES SNDRV_PCM_RATE_48000
|
||||||
|
|
||||||
static int msm_hdmi_audio_codec_return_value;
|
static const char *const ext_disp_audio_type_text[] = {"None", "HDMI", "DP"};
|
||||||
|
|
||||||
struct msm_hdmi_audio_codec_rx_data {
|
static SOC_ENUM_SINGLE_EXT_DECL(ext_disp_audio_type, ext_disp_audio_type_text);
|
||||||
struct platform_device *hdmi_core_pdev;
|
|
||||||
struct msm_ext_disp_audio_codec_ops hdmi_ops;
|
struct msm_ext_disp_audio_codec_rx_data {
|
||||||
|
struct platform_device *ext_disp_core_pdev;
|
||||||
|
struct msm_ext_disp_audio_codec_ops ext_disp_ops;
|
||||||
|
int cable_status;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int msm_hdmi_edid_ctl_info(struct snd_kcontrol *kcontrol,
|
static int msm_ext_disp_edid_ctl_info(struct snd_kcontrol *kcontrol,
|
||||||
struct snd_ctl_elem_info *uinfo)
|
struct snd_ctl_elem_info *uinfo)
|
||||||
{
|
{
|
||||||
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
|
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
|
||||||
struct msm_hdmi_audio_codec_rx_data *codec_data;
|
struct msm_ext_disp_audio_codec_rx_data *codec_data;
|
||||||
struct msm_ext_disp_audio_edid_blk edid_blk;
|
struct msm_ext_disp_audio_edid_blk edid_blk;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
codec_data = snd_soc_codec_get_drvdata(codec);
|
codec_data = snd_soc_codec_get_drvdata(codec);
|
||||||
|
|
||||||
if (!codec_data->hdmi_ops.get_audio_edid_blk) {
|
if (!codec_data) {
|
||||||
pr_debug("%s: get_audio_edid_blk() is NULL\n", __func__);
|
dev_err(codec->dev, "%s: codec_data is NULL\n", __func__);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!codec_data->ext_disp_ops.get_audio_edid_blk) {
|
||||||
|
dev_dbg(codec->dev, "%s: get_audio_edid_blk() is NULL\n",
|
||||||
|
__func__);
|
||||||
uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
|
uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
|
||||||
uinfo->count = 0;
|
uinfo->count = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = codec_data->hdmi_ops.get_audio_edid_blk(
|
rc = codec_data->ext_disp_ops.get_audio_edid_blk(
|
||||||
codec_data->hdmi_core_pdev,
|
codec_data->ext_disp_core_pdev, &edid_blk);
|
||||||
&edid_blk);
|
|
||||||
if (!IS_ERR_VALUE(rc)) {
|
if (!IS_ERR_VALUE(rc)) {
|
||||||
uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
|
uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
|
||||||
uinfo->count = edid_blk.audio_data_blk_size +
|
uinfo->count = edid_blk.audio_data_blk_size +
|
||||||
edid_blk.spk_alloc_data_blk_size;
|
edid_blk.spk_alloc_data_blk_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dev_dbg(codec->dev, "%s: count: %d\n", __func__, uinfo->count);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msm_hdmi_edid_get(struct snd_kcontrol *kcontrol,
|
static int msm_ext_disp_edid_get(struct snd_kcontrol *kcontrol,
|
||||||
struct snd_ctl_elem_value *ucontrol) {
|
struct snd_ctl_elem_value *ucontrol) {
|
||||||
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
|
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
|
||||||
struct msm_hdmi_audio_codec_rx_data *codec_data;
|
struct msm_ext_disp_audio_codec_rx_data *codec_data;
|
||||||
struct msm_ext_disp_audio_edid_blk edid_blk;
|
struct msm_ext_disp_audio_edid_blk edid_blk;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
codec_data = snd_soc_codec_get_drvdata(codec);
|
codec_data = snd_soc_codec_get_drvdata(codec);
|
||||||
|
if (!codec_data || !codec_data->ext_disp_ops.get_audio_edid_blk) {
|
||||||
if (!codec_data->hdmi_ops.get_audio_edid_blk)
|
dev_err(codec->dev, "%s: codec_data or get_audio_edid_blk() is NULL\n",
|
||||||
|
__func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
rc = codec_data->hdmi_ops.get_audio_edid_blk(
|
rc = codec_data->ext_disp_ops.get_audio_edid_blk(
|
||||||
codec_data->hdmi_core_pdev, &edid_blk);
|
codec_data->ext_disp_core_pdev, &edid_blk);
|
||||||
|
|
||||||
if (!IS_ERR_VALUE(rc)) {
|
if (!IS_ERR_VALUE(rc)) {
|
||||||
memcpy(ucontrol->value.bytes.data,
|
memcpy(ucontrol->value.bytes.data,
|
||||||
edid_blk.audio_data_blk,
|
edid_blk.audio_data_blk,
|
||||||
edid_blk.audio_data_blk_size);
|
edid_blk.audio_data_blk_size);
|
||||||
memcpy((ucontrol->value.bytes.data +
|
memcpy((ucontrol->value.bytes.data +
|
||||||
edid_blk.audio_data_blk_size),
|
edid_blk.audio_data_blk_size),
|
||||||
edid_blk.spk_alloc_data_blk,
|
edid_blk.spk_alloc_data_blk,
|
||||||
edid_blk.spk_alloc_data_blk_size);
|
edid_blk.spk_alloc_data_blk_size);
|
||||||
|
|
||||||
|
dev_dbg(codec->dev, "%s: data_blk_size:%d, spk_alloc_data_blk_size:%d\n",
|
||||||
|
__func__, edid_blk.audio_data_blk_size,
|
||||||
|
edid_blk.spk_alloc_data_blk_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct snd_kcontrol_new msm_hdmi_codec_rx_controls[] = {
|
static int msm_ext_disp_audio_type_get(struct snd_kcontrol *kcontrol,
|
||||||
|
struct snd_ctl_elem_value *ucontrol)
|
||||||
|
{
|
||||||
|
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
|
||||||
|
struct msm_ext_disp_audio_codec_rx_data *codec_data;
|
||||||
|
enum msm_ext_disp_cable_state cable_state;
|
||||||
|
enum msm_ext_disp_type disp_type;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
codec_data = snd_soc_codec_get_drvdata(codec);
|
||||||
|
if (!codec_data ||
|
||||||
|
!codec_data->ext_disp_ops.get_audio_edid_blk ||
|
||||||
|
!codec_data->ext_disp_ops.get_intf_id) {
|
||||||
|
dev_err(codec->dev, "%s: codec_data, get_audio_edid_blk() or get_intf_id is NULL\n",
|
||||||
|
__func__);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
cable_state = codec_data->ext_disp_ops.cable_status(
|
||||||
|
codec_data->ext_disp_core_pdev, 1);
|
||||||
|
if (IS_ERR_VALUE(cable_state)) {
|
||||||
|
dev_err(codec->dev, "%s: Error retrieving cable state from ext_disp, err:%d\n",
|
||||||
|
__func__, cable_state);
|
||||||
|
rc = cable_state;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
codec_data->cable_status = cable_state;
|
||||||
|
if (cable_state == EXT_DISPLAY_CABLE_DISCONNECT) {
|
||||||
|
dev_err(codec->dev, "%s: Display cable disconnected\n",
|
||||||
|
__func__);
|
||||||
|
ucontrol->value.integer.value[0] = 0;
|
||||||
|
rc = 0;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
disp_type = codec_data->ext_disp_ops.get_intf_id(
|
||||||
|
codec_data->ext_disp_core_pdev);
|
||||||
|
if (!IS_ERR_VALUE(disp_type)) {
|
||||||
|
switch (disp_type) {
|
||||||
|
case EXT_DISPLAY_TYPE_DP:
|
||||||
|
ucontrol->value.integer.value[0] = 2;
|
||||||
|
rc = 0;
|
||||||
|
break;
|
||||||
|
case EXT_DISPLAY_TYPE_HDMI:
|
||||||
|
ucontrol->value.integer.value[0] = 1;
|
||||||
|
rc = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
rc = -EINVAL;
|
||||||
|
dev_err(codec->dev, "%s: Invalid disp_type:%d\n",
|
||||||
|
__func__, disp_type);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
dev_dbg(codec->dev, "%s: Display type: %d\n",
|
||||||
|
__func__, disp_type);
|
||||||
|
} else {
|
||||||
|
dev_err(codec->dev, "%s: Error retrieving disp_type from ext_disp, err:%d\n",
|
||||||
|
__func__, disp_type);
|
||||||
|
rc = disp_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
done:
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct snd_kcontrol_new msm_ext_disp_codec_rx_controls[] = {
|
||||||
{
|
{
|
||||||
.access = SNDRV_CTL_ELEM_ACCESS_READ |
|
.access = SNDRV_CTL_ELEM_ACCESS_READ |
|
||||||
SNDRV_CTL_ELEM_ACCESS_VOLATILE,
|
SNDRV_CTL_ELEM_ACCESS_VOLATILE,
|
||||||
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
|
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
|
||||||
.name = "HDMI EDID",
|
.name = "HDMI EDID",
|
||||||
.info = msm_hdmi_edid_ctl_info,
|
.info = msm_ext_disp_edid_ctl_info,
|
||||||
.get = msm_hdmi_edid_get,
|
.get = msm_ext_disp_edid_get,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.access = SNDRV_CTL_ELEM_ACCESS_READ |
|
||||||
|
SNDRV_CTL_ELEM_ACCESS_VOLATILE,
|
||||||
|
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
|
||||||
|
.name = "Display Port EDID",
|
||||||
|
.info = msm_ext_disp_edid_ctl_info,
|
||||||
|
.get = msm_ext_disp_edid_get,
|
||||||
|
},
|
||||||
|
SOC_ENUM_EXT("External Display Type", ext_disp_audio_type,
|
||||||
|
msm_ext_disp_audio_type_get, NULL),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int msm_hdmi_audio_codec_rx_dai_startup(
|
static int msm_ext_disp_audio_codec_rx_dai_startup(
|
||||||
struct snd_pcm_substream *substream,
|
struct snd_pcm_substream *substream,
|
||||||
struct snd_soc_dai *dai)
|
struct snd_soc_dai *dai)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct msm_hdmi_audio_codec_rx_data *codec_data =
|
struct msm_ext_disp_audio_codec_rx_data *codec_data =
|
||||||
dev_get_drvdata(dai->codec->dev);
|
dev_get_drvdata(dai->codec->dev);
|
||||||
|
|
||||||
if (!codec_data->hdmi_ops.cable_status) {
|
if (!codec_data || !codec_data->ext_disp_ops.cable_status) {
|
||||||
dev_err(dai->dev, "%s() cable_status is null\n", __func__);
|
dev_err(dai->dev, "%s() codec_data or cable_status is null\n",
|
||||||
|
__func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
msm_hdmi_audio_codec_return_value =
|
codec_data->cable_status =
|
||||||
codec_data->hdmi_ops.cable_status(
|
codec_data->ext_disp_ops.cable_status(
|
||||||
codec_data->hdmi_core_pdev, 1);
|
codec_data->ext_disp_core_pdev, 1);
|
||||||
if (IS_ERR_VALUE(msm_hdmi_audio_codec_return_value)) {
|
if (IS_ERR_VALUE(codec_data->cable_status)) {
|
||||||
dev_err(dai->dev,
|
dev_err(dai->dev,
|
||||||
"%s() HDMI core is not ready (ret val = %d)\n",
|
"%s() ext disp core is not ready (ret val = %d)\n",
|
||||||
__func__, msm_hdmi_audio_codec_return_value);
|
__func__, codec_data->cable_status);
|
||||||
ret = msm_hdmi_audio_codec_return_value;
|
ret = codec_data->cable_status;
|
||||||
} else if (!msm_hdmi_audio_codec_return_value) {
|
} else if (!codec_data->cable_status) {
|
||||||
dev_err(dai->dev,
|
dev_err(dai->dev,
|
||||||
"%s() HDMI cable is not connected (ret val = %d)\n",
|
"%s() ext disp cable is not connected (ret val = %d)\n",
|
||||||
__func__, msm_hdmi_audio_codec_return_value);
|
__func__, codec_data->cable_status);
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msm_hdmi_audio_codec_rx_dai_hw_params(
|
static int msm_ext_disp_audio_codec_rx_dai_hw_params(
|
||||||
struct snd_pcm_substream *substream,
|
struct snd_pcm_substream *substream,
|
||||||
struct snd_pcm_hw_params *params,
|
struct snd_pcm_hw_params *params,
|
||||||
struct snd_soc_dai *dai)
|
struct snd_soc_dai *dai)
|
||||||
|
@ -139,23 +232,24 @@ static int msm_hdmi_audio_codec_rx_dai_hw_params(
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
struct msm_ext_disp_audio_setup_params audio_setup_params = {0};
|
struct msm_ext_disp_audio_setup_params audio_setup_params = {0};
|
||||||
|
|
||||||
struct msm_hdmi_audio_codec_rx_data *codec_data =
|
struct msm_ext_disp_audio_codec_rx_data *codec_data =
|
||||||
dev_get_drvdata(dai->codec->dev);
|
dev_get_drvdata(dai->codec->dev);
|
||||||
|
|
||||||
if (!codec_data->hdmi_ops.audio_info_setup) {
|
if (!codec_data || !codec_data->ext_disp_ops.audio_info_setup) {
|
||||||
dev_err(dai->dev, "%s() audio_info_setup is null\n", __func__);
|
dev_err(dai->dev, "%s: codec_data or audio_info_setup is null\n",
|
||||||
|
__func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ERR_VALUE(msm_hdmi_audio_codec_return_value)) {
|
if (IS_ERR_VALUE(codec_data->cable_status)) {
|
||||||
dev_err_ratelimited(dai->dev,
|
dev_err_ratelimited(dai->dev,
|
||||||
"%s() HDMI core is not ready (ret val = %d)\n",
|
"%s() ext disp core is not ready (ret val = %d)\n",
|
||||||
__func__, msm_hdmi_audio_codec_return_value);
|
__func__, codec_data->cable_status);
|
||||||
return msm_hdmi_audio_codec_return_value;
|
return codec_data->cable_status;
|
||||||
} else if (!msm_hdmi_audio_codec_return_value) {
|
} else if (!codec_data->cable_status) {
|
||||||
dev_err_ratelimited(dai->dev,
|
dev_err_ratelimited(dai->dev,
|
||||||
"%s() HDMI cable is not connected (ret val = %d)\n",
|
"%s() ext disp cable is not connected (ret val = %d)\n",
|
||||||
__func__, msm_hdmi_audio_codec_return_value);
|
__func__, codec_data->cable_status);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,54 +298,49 @@ static int msm_hdmi_audio_codec_rx_dai_hw_params(
|
||||||
audio_setup_params.level_shift = level_shift;
|
audio_setup_params.level_shift = level_shift;
|
||||||
audio_setup_params.down_mix = down_mix;
|
audio_setup_params.down_mix = down_mix;
|
||||||
|
|
||||||
rc = codec_data->hdmi_ops.audio_info_setup(
|
rc = codec_data->ext_disp_ops.audio_info_setup(
|
||||||
codec_data->hdmi_core_pdev, &audio_setup_params);
|
codec_data->ext_disp_core_pdev, &audio_setup_params);
|
||||||
if (IS_ERR_VALUE(rc)) {
|
if (IS_ERR_VALUE(rc)) {
|
||||||
dev_err_ratelimited(dai->dev,
|
dev_err_ratelimited(dai->dev,
|
||||||
"%s() HDMI core is not ready, rc: %d\n",
|
"%s() ext disp core is not ready, rc: %d\n",
|
||||||
__func__, rc);
|
__func__, rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void msm_hdmi_audio_codec_rx_dai_shutdown(
|
static void msm_ext_disp_audio_codec_rx_dai_shutdown(
|
||||||
struct snd_pcm_substream *substream,
|
struct snd_pcm_substream *substream,
|
||||||
struct snd_soc_dai *dai)
|
struct snd_soc_dai *dai)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
struct msm_hdmi_audio_codec_rx_data *codec_data =
|
struct msm_ext_disp_audio_codec_rx_data *codec_data =
|
||||||
dev_get_drvdata(dai->codec->dev);
|
dev_get_drvdata(dai->codec->dev);
|
||||||
|
|
||||||
if (!codec_data->hdmi_ops.cable_status) {
|
if (!codec_data || !codec_data->ext_disp_ops.cable_status) {
|
||||||
dev_err(dai->dev, "%s() cable_status is null\n", __func__);
|
dev_err(dai->dev, "%s: codec data or cable_status is null\n",
|
||||||
|
__func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = codec_data->hdmi_ops.cable_status(
|
rc = codec_data->ext_disp_ops.cable_status(
|
||||||
codec_data->hdmi_core_pdev, 0);
|
codec_data->ext_disp_core_pdev, 0);
|
||||||
if (IS_ERR_VALUE(rc)) {
|
if (IS_ERR_VALUE(rc)) {
|
||||||
dev_err(dai->dev,
|
dev_err(dai->dev,
|
||||||
"%s() HDMI core had problems releasing HDMI audio flag\n",
|
"%s: ext disp core had problems releasing audio flag\n",
|
||||||
__func__);
|
__func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct snd_soc_dai_ops msm_hdmi_audio_codec_rx_dai_ops = {
|
static int msm_ext_disp_audio_codec_rx_probe(struct snd_soc_codec *codec)
|
||||||
.startup = msm_hdmi_audio_codec_rx_dai_startup,
|
|
||||||
.hw_params = msm_hdmi_audio_codec_rx_dai_hw_params,
|
|
||||||
.shutdown = msm_hdmi_audio_codec_rx_dai_shutdown
|
|
||||||
};
|
|
||||||
|
|
||||||
static int msm_hdmi_audio_codec_rx_probe(struct snd_soc_codec *codec)
|
|
||||||
{
|
{
|
||||||
struct msm_hdmi_audio_codec_rx_data *codec_data;
|
struct msm_ext_disp_audio_codec_rx_data *codec_data;
|
||||||
struct device_node *of_node_parent = NULL;
|
struct device_node *of_node_parent = NULL;
|
||||||
|
|
||||||
codec_data = kzalloc(sizeof(struct msm_hdmi_audio_codec_rx_data),
|
codec_data = kzalloc(sizeof(struct msm_ext_disp_audio_codec_rx_data),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
|
||||||
if (!codec_data) {
|
if (!codec_data) {
|
||||||
|
@ -268,16 +357,16 @@ static int msm_hdmi_audio_codec_rx_probe(struct snd_soc_codec *codec)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
codec_data->hdmi_core_pdev = of_find_device_by_node(of_node_parent);
|
codec_data->ext_disp_core_pdev = of_find_device_by_node(of_node_parent);
|
||||||
if (!codec_data->hdmi_core_pdev) {
|
if (!codec_data->ext_disp_core_pdev) {
|
||||||
dev_err(codec->dev, "%s(): can't get parent pdev\n", __func__);
|
dev_err(codec->dev, "%s(): can't get parent pdev\n", __func__);
|
||||||
kfree(codec_data);
|
kfree(codec_data);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msm_hdmi_register_audio_codec(codec_data->hdmi_core_pdev,
|
if (msm_ext_disp_register_audio_codec(codec_data->ext_disp_core_pdev,
|
||||||
&codec_data->hdmi_ops)) {
|
&codec_data->ext_disp_ops)) {
|
||||||
dev_err(codec->dev, "%s(): can't register with hdmi core",
|
dev_err(codec->dev, "%s(): can't register with ext disp core",
|
||||||
__func__);
|
__func__);
|
||||||
kfree(codec_data);
|
kfree(codec_data);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
@ -285,15 +374,15 @@ static int msm_hdmi_audio_codec_rx_probe(struct snd_soc_codec *codec)
|
||||||
|
|
||||||
dev_set_drvdata(codec->dev, codec_data);
|
dev_set_drvdata(codec->dev, codec_data);
|
||||||
|
|
||||||
dev_dbg(codec->dev, "%s(): registerd %s with HDMI core\n",
|
dev_dbg(codec->dev, "%s(): registered %s with ext disp core\n",
|
||||||
__func__, codec->component.name);
|
__func__, codec->component.name);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msm_hdmi_audio_codec_rx_remove(struct snd_soc_codec *codec)
|
static int msm_ext_disp_audio_codec_rx_remove(struct snd_soc_codec *codec)
|
||||||
{
|
{
|
||||||
struct msm_hdmi_audio_codec_rx_data *codec_data;
|
struct msm_ext_disp_audio_codec_rx_data *codec_data;
|
||||||
|
|
||||||
codec_data = dev_get_drvdata(codec->dev);
|
codec_data = dev_get_drvdata(codec->dev);
|
||||||
kfree(codec_data);
|
kfree(codec_data);
|
||||||
|
@ -301,7 +390,13 @@ static int msm_hdmi_audio_codec_rx_remove(struct snd_soc_codec *codec)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct snd_soc_dai_driver msm_hdmi_audio_codec_rx_dais[] = {
|
static struct snd_soc_dai_ops msm_ext_disp_audio_codec_rx_dai_ops = {
|
||||||
|
.startup = msm_ext_disp_audio_codec_rx_dai_startup,
|
||||||
|
.hw_params = msm_ext_disp_audio_codec_rx_dai_hw_params,
|
||||||
|
.shutdown = msm_ext_disp_audio_codec_rx_dai_shutdown
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct snd_soc_dai_driver msm_ext_disp_audio_codec_rx_dais[] = {
|
||||||
{
|
{
|
||||||
.name = "msm_hdmi_audio_codec_rx_dai",
|
.name = "msm_hdmi_audio_codec_rx_dai",
|
||||||
.playback = {
|
.playback = {
|
||||||
|
@ -310,66 +405,89 @@ static struct snd_soc_dai_driver msm_hdmi_audio_codec_rx_dais[] = {
|
||||||
.channels_max = 8,
|
.channels_max = 8,
|
||||||
.rate_min = 48000,
|
.rate_min = 48000,
|
||||||
.rate_max = 48000,
|
.rate_max = 48000,
|
||||||
.rates = MSM_HDMI_PCM_RATES,
|
.rates = MSM_EXT_DISP_PCM_RATES,
|
||||||
.formats = SNDRV_PCM_FMTBIT_S16_LE,
|
.formats = SNDRV_PCM_FMTBIT_S16_LE,
|
||||||
},
|
},
|
||||||
.ops = &msm_hdmi_audio_codec_rx_dai_ops,
|
.ops = &msm_ext_disp_audio_codec_rx_dai_ops,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "msm_dp_audio_codec_rx_dai",
|
||||||
|
.playback = {
|
||||||
|
.stream_name = "Display Port Playback",
|
||||||
|
.channels_min = 1,
|
||||||
|
.channels_max = 8,
|
||||||
|
.rate_min = 48000,
|
||||||
|
.rate_max = 192000,
|
||||||
|
.rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 |
|
||||||
|
SNDRV_PCM_RATE_192000,
|
||||||
|
.formats = SNDRV_PCM_FMTBIT_S16_LE |
|
||||||
|
SNDRV_PCM_FMTBIT_S24_LE,
|
||||||
|
},
|
||||||
|
.ops = &msm_ext_disp_audio_codec_rx_dai_ops,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct snd_soc_codec_driver msm_hdmi_audio_codec_rx_soc_driver = {
|
static struct snd_soc_codec_driver msm_ext_disp_audio_codec_rx_soc_driver = {
|
||||||
.probe = msm_hdmi_audio_codec_rx_probe,
|
.probe = msm_ext_disp_audio_codec_rx_probe,
|
||||||
.remove = msm_hdmi_audio_codec_rx_remove,
|
.remove = msm_ext_disp_audio_codec_rx_remove,
|
||||||
.controls = msm_hdmi_codec_rx_controls,
|
.controls = msm_ext_disp_codec_rx_controls,
|
||||||
.num_controls = ARRAY_SIZE(msm_hdmi_codec_rx_controls),
|
.num_controls = ARRAY_SIZE(msm_ext_disp_codec_rx_controls),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int msm_hdmi_audio_codec_rx_plat_probe(
|
static int msm_ext_disp_audio_codec_rx_plat_probe(
|
||||||
struct platform_device *pdev)
|
struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
dev_dbg(&pdev->dev, "%s(): dev name %s\n", __func__,
|
dev_dbg(&pdev->dev, "%s(): dev name %s\n", __func__,
|
||||||
dev_name(&pdev->dev));
|
dev_name(&pdev->dev));
|
||||||
|
|
||||||
return snd_soc_register_codec(&pdev->dev,
|
return snd_soc_register_codec(&pdev->dev,
|
||||||
&msm_hdmi_audio_codec_rx_soc_driver,
|
&msm_ext_disp_audio_codec_rx_soc_driver,
|
||||||
msm_hdmi_audio_codec_rx_dais,
|
msm_ext_disp_audio_codec_rx_dais,
|
||||||
ARRAY_SIZE(msm_hdmi_audio_codec_rx_dais));
|
ARRAY_SIZE(msm_ext_disp_audio_codec_rx_dais));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msm_hdmi_audio_codec_rx_plat_remove(
|
static int msm_ext_disp_audio_codec_rx_plat_remove(
|
||||||
struct platform_device *pdev)
|
struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
snd_soc_unregister_codec(&pdev->dev);
|
snd_soc_unregister_codec(&pdev->dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
static const struct of_device_id msm_hdmi_audio_codec_rx_dt_match[] = {
|
static const struct of_device_id msm_ext_disp_audio_codec_rx_dt_match[] = {
|
||||||
{ .compatible = "qcom,msm-hdmi-audio-codec-rx", },
|
{ .compatible = "qcom,msm-ext-disp-audio-codec-rx", },
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, msm_hdmi_codec_dt_match);
|
MODULE_DEVICE_TABLE(of, msm_ext_disp_audio_codec_rx_dt_match);
|
||||||
|
|
||||||
static struct platform_driver msm_hdmi_audio_codec_rx_driver = {
|
static struct platform_driver msm_ext_disp_audio_codec_rx_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "msm-hdmi-audio-codec-rx",
|
.name = "msm-ext-disp-audio-codec-rx",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.of_match_table = msm_hdmi_audio_codec_rx_dt_match,
|
.of_match_table = msm_ext_disp_audio_codec_rx_dt_match,
|
||||||
},
|
},
|
||||||
.probe = msm_hdmi_audio_codec_rx_plat_probe,
|
.probe = msm_ext_disp_audio_codec_rx_plat_probe,
|
||||||
.remove = msm_hdmi_audio_codec_rx_plat_remove,
|
.remove = msm_ext_disp_audio_codec_rx_plat_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init msm_hdmi_audio_codec_rx_init(void)
|
static int __init msm_ext_disp_audio_codec_rx_init(void)
|
||||||
{
|
{
|
||||||
return platform_driver_register(&msm_hdmi_audio_codec_rx_driver);
|
int rc;
|
||||||
}
|
|
||||||
module_init(msm_hdmi_audio_codec_rx_init);
|
|
||||||
|
|
||||||
static void __exit msm_hdmi_audio_codec_rx_exit(void)
|
rc = platform_driver_register(&msm_ext_disp_audio_codec_rx_driver);
|
||||||
|
if (rc) {
|
||||||
|
pr_err("%s: failed to register ext disp codec driver err:%d\n",
|
||||||
|
__func__, rc);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
module_init(msm_ext_disp_audio_codec_rx_init);
|
||||||
|
|
||||||
|
static void __exit msm_ext_disp_audio_codec_rx_exit(void)
|
||||||
{
|
{
|
||||||
platform_driver_unregister(&msm_hdmi_audio_codec_rx_driver);
|
platform_driver_unregister(&msm_ext_disp_audio_codec_rx_driver);
|
||||||
}
|
}
|
||||||
module_exit(msm_hdmi_audio_codec_rx_exit);
|
module_exit(msm_ext_disp_audio_codec_rx_exit);
|
||||||
|
|
||||||
MODULE_DESCRIPTION("MSM HDMI CODEC driver");
|
MODULE_DESCRIPTION("MSM External Display Audio CODEC Driver");
|
||||||
MODULE_VERSION("1.0");
|
MODULE_VERSION("1.0");
|
||||||
MODULE_LICENSE("GPL v2");
|
MODULE_LICENSE("GPL v2");
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 and
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -32,53 +32,82 @@ enum {
|
||||||
STATUS_MAX
|
STATUS_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
struct msm_hdmi_ca {
|
struct msm_ext_disp_ca {
|
||||||
bool set_ca;
|
bool set_ca;
|
||||||
u32 ca;
|
u32 ca;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct msm_hdmi_ca hdmi_ca = { false, 0x0 };
|
|
||||||
|
|
||||||
struct msm_dai_q6_hdmi_dai_data {
|
struct msm_dai_q6_hdmi_dai_data {
|
||||||
DECLARE_BITMAP(status_mask, STATUS_MAX);
|
DECLARE_BITMAP(status_mask, STATUS_MAX);
|
||||||
u32 rate;
|
u32 rate;
|
||||||
u32 channels;
|
u32 channels;
|
||||||
|
struct msm_ext_disp_ca ca;
|
||||||
union afe_port_config port_config;
|
union afe_port_config port_config;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int msm_dai_q6_hdmi_format_put(struct snd_kcontrol *kcontrol,
|
static int msm_dai_q6_ext_disp_format_put(struct snd_kcontrol *kcontrol,
|
||||||
struct snd_ctl_elem_value *ucontrol)
|
struct snd_ctl_elem_value *ucontrol)
|
||||||
{
|
{
|
||||||
|
|
||||||
struct msm_dai_q6_hdmi_dai_data *dai_data = kcontrol->private_data;
|
struct msm_dai_q6_hdmi_dai_data *dai_data = kcontrol->private_data;
|
||||||
int value = ucontrol->value.integer.value[0];
|
int value = ucontrol->value.integer.value[0];
|
||||||
|
|
||||||
|
if (!dai_data) {
|
||||||
|
pr_err("%s: dai_data is NULL\n", __func__);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
dai_data->port_config.hdmi_multi_ch.datatype = value;
|
dai_data->port_config.hdmi_multi_ch.datatype = value;
|
||||||
pr_debug("%s: value = %d\n", __func__, value);
|
pr_debug("%s: value = %d\n", __func__, value);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msm_dai_q6_hdmi_format_get(struct snd_kcontrol *kcontrol,
|
static int msm_dai_q6_ext_disp_format_get(struct snd_kcontrol *kcontrol,
|
||||||
struct snd_ctl_elem_value *ucontrol)
|
struct snd_ctl_elem_value *ucontrol)
|
||||||
{
|
{
|
||||||
|
|
||||||
struct msm_dai_q6_hdmi_dai_data *dai_data = kcontrol->private_data;
|
struct msm_dai_q6_hdmi_dai_data *dai_data = kcontrol->private_data;
|
||||||
|
|
||||||
|
if (!dai_data) {
|
||||||
|
pr_err("%s: dai_data is NULL\n", __func__);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
ucontrol->value.integer.value[0] =
|
ucontrol->value.integer.value[0] =
|
||||||
dai_data->port_config.hdmi_multi_ch.datatype;
|
dai_data->port_config.hdmi_multi_ch.datatype;
|
||||||
|
pr_debug("%s: value = %ld\n",
|
||||||
|
__func__, ucontrol->value.integer.value[0]);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msm_dai_q6_hdmi_ca_put(struct snd_kcontrol *kcontrol,
|
static int msm_dai_q6_ext_disp_ca_put(struct snd_kcontrol *kcontrol,
|
||||||
struct snd_ctl_elem_value *ucontrol)
|
struct snd_ctl_elem_value *ucontrol)
|
||||||
{
|
{
|
||||||
hdmi_ca.ca = ucontrol->value.integer.value[0];
|
struct msm_dai_q6_hdmi_dai_data *dai_data = kcontrol->private_data;
|
||||||
hdmi_ca.set_ca = true;
|
|
||||||
|
if (!dai_data) {
|
||||||
|
pr_err("%s: dai_data is NULL\n", __func__);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
dai_data->ca.ca = ucontrol->value.integer.value[0];
|
||||||
|
dai_data->ca.set_ca = true;
|
||||||
|
pr_debug("%s: ca = %d\n", __func__, dai_data->ca.ca);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msm_dai_q6_hdmi_ca_get(struct snd_kcontrol *kcontrol,
|
static int msm_dai_q6_ext_disp_ca_get(struct snd_kcontrol *kcontrol,
|
||||||
struct snd_ctl_elem_value *ucontrol)
|
struct snd_ctl_elem_value *ucontrol)
|
||||||
{
|
{
|
||||||
ucontrol->value.integer.value[0] = hdmi_ca.ca;
|
struct msm_dai_q6_hdmi_dai_data *dai_data = kcontrol->private_data;
|
||||||
|
|
||||||
|
if (!dai_data) {
|
||||||
|
pr_err("%s: dai_data is NULL\n", __func__);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
ucontrol->value.integer.value[0] = dai_data->ca.ca;
|
||||||
|
pr_debug("%s: ca = %d\n", __func__, dai_data->ca.ca);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,12 +126,22 @@ static const struct soc_enum hdmi_config_enum[] = {
|
||||||
|
|
||||||
static const struct snd_kcontrol_new hdmi_config_controls[] = {
|
static const struct snd_kcontrol_new hdmi_config_controls[] = {
|
||||||
SOC_ENUM_EXT("HDMI RX Format", hdmi_config_enum[0],
|
SOC_ENUM_EXT("HDMI RX Format", hdmi_config_enum[0],
|
||||||
msm_dai_q6_hdmi_format_get,
|
msm_dai_q6_ext_disp_format_get,
|
||||||
msm_dai_q6_hdmi_format_put),
|
msm_dai_q6_ext_disp_format_put),
|
||||||
SOC_SINGLE_MULTI_EXT("HDMI RX CA", SND_SOC_NOPM, 0,
|
SOC_SINGLE_MULTI_EXT("HDMI RX CA", SND_SOC_NOPM, 0,
|
||||||
HDMI_RX_CA_MAX, 0, 1,
|
HDMI_RX_CA_MAX, 0, 1,
|
||||||
msm_dai_q6_hdmi_ca_get,
|
msm_dai_q6_ext_disp_ca_get,
|
||||||
msm_dai_q6_hdmi_ca_put),
|
msm_dai_q6_ext_disp_ca_put),
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct snd_kcontrol_new display_port_config_controls[] = {
|
||||||
|
SOC_ENUM_EXT("Display Port RX Format", hdmi_config_enum[0],
|
||||||
|
msm_dai_q6_ext_disp_format_get,
|
||||||
|
msm_dai_q6_ext_disp_format_put),
|
||||||
|
SOC_SINGLE_MULTI_EXT("Display Port RX CA", SND_SOC_NOPM, 0,
|
||||||
|
HDMI_RX_CA_MAX, 0, 1,
|
||||||
|
msm_dai_q6_ext_disp_ca_get,
|
||||||
|
msm_dai_q6_ext_disp_ca_put),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Current implementation assumes hw_param is called once
|
/* Current implementation assumes hw_param is called once
|
||||||
|
@ -200,9 +239,9 @@ static int msm_dai_q6_hdmi_prepare(struct snd_pcm_substream *substream,
|
||||||
struct msm_dai_q6_hdmi_dai_data *dai_data = dev_get_drvdata(dai->dev);
|
struct msm_dai_q6_hdmi_dai_data *dai_data = dev_get_drvdata(dai->dev);
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (hdmi_ca.set_ca)
|
if (dai_data->ca.set_ca)
|
||||||
dai_data->port_config.hdmi_multi_ch.channel_allocation =
|
dai_data->port_config.hdmi_multi_ch.channel_allocation =
|
||||||
hdmi_ca.ca;
|
dai_data->ca.ca;
|
||||||
|
|
||||||
if (!test_bit(STATUS_PORT_STARTED, dai_data->status_mask)) {
|
if (!test_bit(STATUS_PORT_STARTED, dai_data->status_mask)) {
|
||||||
rc = afe_port_start(dai->id, &dai_data->port_config,
|
rc = afe_port_start(dai->id, &dai_data->port_config,
|
||||||
|
@ -236,8 +275,8 @@ static int msm_dai_q6_hdmi_dai_probe(struct snd_soc_dai *dai)
|
||||||
struct snd_soc_dapm_route intercon;
|
struct snd_soc_dapm_route intercon;
|
||||||
struct snd_soc_dapm_context *dapm;
|
struct snd_soc_dapm_context *dapm;
|
||||||
|
|
||||||
if (!dai) {
|
if (!dai || !dai->driver) {
|
||||||
pr_err("%s: dai not found\n", __func__);
|
pr_err("%s: dai or dai->driver is NULL\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
dai_data = kzalloc(sizeof(struct msm_dai_q6_hdmi_dai_data),
|
dai_data = kzalloc(sizeof(struct msm_dai_q6_hdmi_dai_data),
|
||||||
|
@ -252,19 +291,33 @@ static int msm_dai_q6_hdmi_dai_probe(struct snd_soc_dai *dai)
|
||||||
|
|
||||||
msm_dai_q6_hdmi_set_dai_id(dai);
|
msm_dai_q6_hdmi_set_dai_id(dai);
|
||||||
|
|
||||||
kcontrol = &hdmi_config_controls[0];
|
if (dai->driver->id == HDMI_RX) {
|
||||||
|
kcontrol = &hdmi_config_controls[0];
|
||||||
|
rc = snd_ctl_add(dai->component->card->snd_card,
|
||||||
|
snd_ctl_new1(kcontrol, dai_data));
|
||||||
|
|
||||||
rc = snd_ctl_add(dai->component->card->snd_card,
|
kcontrol = &hdmi_config_controls[1];
|
||||||
snd_ctl_new1(kcontrol, dai_data));
|
rc = snd_ctl_add(dai->component->card->snd_card,
|
||||||
|
snd_ctl_new1(kcontrol, dai_data));
|
||||||
|
} else if (dai->driver->id == DISPLAY_PORT_RX) {
|
||||||
|
kcontrol = &display_port_config_controls[0];
|
||||||
|
rc = snd_ctl_add(dai->component->card->snd_card,
|
||||||
|
snd_ctl_new1(kcontrol, dai_data));
|
||||||
|
|
||||||
kcontrol = &hdmi_config_controls[1];
|
kcontrol = &display_port_config_controls[1];
|
||||||
|
rc = snd_ctl_add(dai->component->card->snd_card,
|
||||||
rc = snd_ctl_add(dai->component->card->snd_card,
|
snd_ctl_new1(kcontrol, dai_data));
|
||||||
snd_ctl_new1(kcontrol, dai_data));
|
} else {
|
||||||
|
dev_err(dai->dev, "%s: Invalid id:%d\n",
|
||||||
|
__func__, dai->driver->id);
|
||||||
|
kfree(dai_data);
|
||||||
|
dev_set_drvdata(dai->dev, NULL);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
dapm = snd_soc_component_get_dapm(dai->component);
|
dapm = snd_soc_component_get_dapm(dai->component);
|
||||||
memset(&intercon, 0 , sizeof(intercon));
|
memset(&intercon, 0 , sizeof(intercon));
|
||||||
if (!rc && dai && dai->driver) {
|
if (!rc) {
|
||||||
if (dai->driver->playback.stream_name &&
|
if (dai->driver->playback.stream_name &&
|
||||||
dai->driver->playback.aif_name) {
|
dai->driver->playback.aif_name) {
|
||||||
dev_dbg(dai->dev, "%s add route for widget %s",
|
dev_dbg(dai->dev, "%s add route for widget %s",
|
||||||
|
@ -325,8 +378,8 @@ static struct snd_soc_dai_driver msm_dai_q6_hdmi_hdmi_rx_dai = {
|
||||||
.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
|
.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
|
||||||
.channels_min = 2,
|
.channels_min = 2,
|
||||||
.channels_max = 8,
|
.channels_max = 8,
|
||||||
.rate_max = 192000,
|
.rate_max = 192000,
|
||||||
.rate_min = 48000,
|
.rate_min = 48000,
|
||||||
},
|
},
|
||||||
.ops = &msm_dai_q6_hdmi_ops,
|
.ops = &msm_dai_q6_hdmi_ops,
|
||||||
.id = HDMI_RX,
|
.id = HDMI_RX,
|
||||||
|
@ -334,6 +387,27 @@ static struct snd_soc_dai_driver msm_dai_q6_hdmi_hdmi_rx_dai = {
|
||||||
.remove = msm_dai_q6_hdmi_dai_remove,
|
.remove = msm_dai_q6_hdmi_dai_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct snd_soc_dai_driver msm_dai_q6_display_port_rx_dai[] = {
|
||||||
|
{
|
||||||
|
.playback = {
|
||||||
|
.stream_name = "Display Port Playback",
|
||||||
|
.aif_name = "DISPLAY_PORT",
|
||||||
|
.rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 |
|
||||||
|
SNDRV_PCM_RATE_192000,
|
||||||
|
.formats = SNDRV_PCM_FMTBIT_S16_LE |
|
||||||
|
SNDRV_PCM_FMTBIT_S24_LE,
|
||||||
|
.channels_min = 2,
|
||||||
|
.channels_max = 8,
|
||||||
|
.rate_max = 192000,
|
||||||
|
.rate_min = 48000,
|
||||||
|
},
|
||||||
|
.ops = &msm_dai_q6_hdmi_ops,
|
||||||
|
.id = DISPLAY_PORT_RX,
|
||||||
|
.probe = msm_dai_q6_hdmi_dai_probe,
|
||||||
|
.remove = msm_dai_q6_hdmi_dai_remove,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
static const struct snd_soc_component_driver msm_dai_hdmi_q6_component = {
|
static const struct snd_soc_component_driver msm_dai_hdmi_q6_component = {
|
||||||
.name = "msm-dai-q6-hdmi",
|
.name = "msm-dai-q6-hdmi",
|
||||||
};
|
};
|
||||||
|
@ -362,6 +436,12 @@ static int msm_dai_q6_hdmi_dev_probe(struct platform_device *pdev)
|
||||||
&msm_dai_hdmi_q6_component,
|
&msm_dai_hdmi_q6_component,
|
||||||
&msm_dai_q6_hdmi_hdmi_rx_dai, 1);
|
&msm_dai_q6_hdmi_hdmi_rx_dai, 1);
|
||||||
break;
|
break;
|
||||||
|
case DISPLAY_PORT_RX:
|
||||||
|
rc = snd_soc_register_component(&pdev->dev,
|
||||||
|
&msm_dai_hdmi_q6_component,
|
||||||
|
&msm_dai_q6_display_port_rx_dai[0],
|
||||||
|
ARRAY_SIZE(msm_dai_q6_display_port_rx_dai));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
dev_err(&pdev->dev, "invalid device ID %d\n", pdev->id);
|
dev_err(&pdev->dev, "invalid device ID %d\n", pdev->id);
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
|
|
|
@ -99,7 +99,8 @@ struct msm_pcm_route_bdai_pp_params {
|
||||||
|
|
||||||
static struct msm_pcm_route_bdai_pp_params
|
static struct msm_pcm_route_bdai_pp_params
|
||||||
msm_bedais_pp_params[MSM_BACKEND_DAI_PP_PARAMS_REQ_MAX] = {
|
msm_bedais_pp_params[MSM_BACKEND_DAI_PP_PARAMS_REQ_MAX] = {
|
||||||
{HDMI_RX, 0, 0, 0}
|
{HDMI_RX, 0, 0, 0},
|
||||||
|
{DISPLAY_PORT_RX, 0, 0, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int msm_routing_send_device_pp_params(int port_id, int copp_idx);
|
static int msm_routing_send_device_pp_params(int port_id, int copp_idx);
|
||||||
|
@ -448,6 +449,7 @@ struct msm_pcm_routing_bdai_data msm_bedais[MSM_BACKEND_DAI_MAX] = {
|
||||||
{ SLIMBUS_8_TX, 0, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_SLIMBUS_8_TX},
|
{ SLIMBUS_8_TX, 0, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_SLIMBUS_8_TX},
|
||||||
{ AFE_PORT_ID_USB_RX, 0, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_USB_AUDIO_RX},
|
{ AFE_PORT_ID_USB_RX, 0, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_USB_AUDIO_RX},
|
||||||
{ AFE_PORT_ID_USB_TX, 0, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_USB_AUDIO_TX},
|
{ AFE_PORT_ID_USB_TX, 0, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_USB_AUDIO_TX},
|
||||||
|
{ DISPLAY_PORT_RX, 0, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_DISPLAY_PORT},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Track ASM playback & capture sessions of DAI */
|
/* Track ASM playback & capture sessions of DAI */
|
||||||
|
@ -2932,6 +2934,58 @@ static const struct snd_kcontrol_new hdmi_mixer_controls[] = {
|
||||||
MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer,
|
MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer,
|
||||||
msm_routing_put_audio_mixer),
|
msm_routing_put_audio_mixer),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct snd_kcontrol_new display_port_mixer_controls[] = {
|
||||||
|
SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia10", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia11", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA11, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia12", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA12, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia13", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA13, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia14", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA14, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia15", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA15, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer,
|
||||||
|
msm_routing_put_audio_mixer),
|
||||||
|
};
|
||||||
|
|
||||||
/* incall music delivery mixer */
|
/* incall music delivery mixer */
|
||||||
static const struct snd_kcontrol_new incall_music_delivery_mixer_controls[] = {
|
static const struct snd_kcontrol_new incall_music_delivery_mixer_controls[] = {
|
||||||
SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_VOICE_PLAYBACK_TX,
|
SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_VOICE_PLAYBACK_TX,
|
||||||
|
@ -5583,6 +5637,12 @@ static const struct snd_kcontrol_new hdmi_rx_port_mixer_controls[] = {
|
||||||
msm_routing_put_port_mixer),
|
msm_routing_put_port_mixer),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct snd_kcontrol_new display_port_rx_port_mixer_controls[] = {
|
||||||
|
SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
|
MSM_BACKEND_DAI_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
|
||||||
|
msm_routing_put_port_mixer),
|
||||||
|
};
|
||||||
|
|
||||||
static const struct snd_kcontrol_new sec_i2s_rx_port_mixer_controls[] = {
|
static const struct snd_kcontrol_new sec_i2s_rx_port_mixer_controls[] = {
|
||||||
SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_SEC_I2S_RX,
|
SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_SEC_I2S_RX,
|
||||||
MSM_BACKEND_DAI_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
|
MSM_BACKEND_DAI_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
|
||||||
|
@ -7435,6 +7495,8 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
|
||||||
SND_SOC_DAPM_AIF_OUT("SLIMBUS_2_RX", "Slimbus2 Playback", 0, 0, 0, 0),
|
SND_SOC_DAPM_AIF_OUT("SLIMBUS_2_RX", "Slimbus2 Playback", 0, 0, 0, 0),
|
||||||
SND_SOC_DAPM_AIF_OUT("SLIMBUS_5_RX", "Slimbus5 Playback", 0, 0, 0, 0),
|
SND_SOC_DAPM_AIF_OUT("SLIMBUS_5_RX", "Slimbus5 Playback", 0, 0, 0, 0),
|
||||||
SND_SOC_DAPM_AIF_OUT("HDMI", "HDMI Playback", 0, 0, 0 , 0),
|
SND_SOC_DAPM_AIF_OUT("HDMI", "HDMI Playback", 0, 0, 0 , 0),
|
||||||
|
SND_SOC_DAPM_AIF_OUT("DISPLAY_PORT", "Display Port Playback",
|
||||||
|
0, 0, 0, 0),
|
||||||
SND_SOC_DAPM_AIF_OUT("MI2S_RX", "MI2S Playback", 0, 0, 0, 0),
|
SND_SOC_DAPM_AIF_OUT("MI2S_RX", "MI2S Playback", 0, 0, 0, 0),
|
||||||
SND_SOC_DAPM_AIF_OUT("QUAT_MI2S_RX", "Quaternary MI2S Playback",
|
SND_SOC_DAPM_AIF_OUT("QUAT_MI2S_RX", "Quaternary MI2S Playback",
|
||||||
0, 0, 0, 0),
|
0, 0, 0, 0),
|
||||||
|
@ -7709,6 +7771,8 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
|
||||||
slimbus_7_rx_mixer_controls, ARRAY_SIZE(slimbus_7_rx_mixer_controls)),
|
slimbus_7_rx_mixer_controls, ARRAY_SIZE(slimbus_7_rx_mixer_controls)),
|
||||||
SND_SOC_DAPM_MIXER("HDMI Mixer", SND_SOC_NOPM, 0, 0,
|
SND_SOC_DAPM_MIXER("HDMI Mixer", SND_SOC_NOPM, 0, 0,
|
||||||
hdmi_mixer_controls, ARRAY_SIZE(hdmi_mixer_controls)),
|
hdmi_mixer_controls, ARRAY_SIZE(hdmi_mixer_controls)),
|
||||||
|
SND_SOC_DAPM_MIXER("DISPLAY_PORT Mixer", SND_SOC_NOPM, 0, 0,
|
||||||
|
display_port_mixer_controls, ARRAY_SIZE(display_port_mixer_controls)),
|
||||||
SND_SOC_DAPM_MIXER("SPDIF_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
|
SND_SOC_DAPM_MIXER("SPDIF_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
|
||||||
spdif_rx_mixer_controls, ARRAY_SIZE(spdif_rx_mixer_controls)),
|
spdif_rx_mixer_controls, ARRAY_SIZE(spdif_rx_mixer_controls)),
|
||||||
SND_SOC_DAPM_MIXER("MI2S_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
|
SND_SOC_DAPM_MIXER("MI2S_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
|
||||||
|
@ -7923,6 +7987,9 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
|
||||||
SND_SOC_DAPM_MIXER("HDMI_RX Port Mixer",
|
SND_SOC_DAPM_MIXER("HDMI_RX Port Mixer",
|
||||||
SND_SOC_NOPM, 0, 0, hdmi_rx_port_mixer_controls,
|
SND_SOC_NOPM, 0, 0, hdmi_rx_port_mixer_controls,
|
||||||
ARRAY_SIZE(hdmi_rx_port_mixer_controls)),
|
ARRAY_SIZE(hdmi_rx_port_mixer_controls)),
|
||||||
|
SND_SOC_DAPM_MIXER("DISPLAY_PORT_RX Port Mixer",
|
||||||
|
SND_SOC_NOPM, 0, 0, display_port_rx_port_mixer_controls,
|
||||||
|
ARRAY_SIZE(display_port_rx_port_mixer_controls)),
|
||||||
SND_SOC_DAPM_MIXER("SEC_I2S_RX Port Mixer",
|
SND_SOC_DAPM_MIXER("SEC_I2S_RX Port Mixer",
|
||||||
SND_SOC_NOPM, 0, 0, sec_i2s_rx_port_mixer_controls,
|
SND_SOC_NOPM, 0, 0, sec_i2s_rx_port_mixer_controls,
|
||||||
ARRAY_SIZE(sec_i2s_rx_port_mixer_controls)),
|
ARRAY_SIZE(sec_i2s_rx_port_mixer_controls)),
|
||||||
|
@ -8114,6 +8181,24 @@ static const struct snd_soc_dapm_route intercon[] = {
|
||||||
{"HDMI Mixer", "MultiMedia16", "MM_DL16"},
|
{"HDMI Mixer", "MultiMedia16", "MM_DL16"},
|
||||||
{"HDMI", NULL, "HDMI Mixer"},
|
{"HDMI", NULL, "HDMI Mixer"},
|
||||||
|
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia1", "MM_DL1"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia2", "MM_DL2"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia3", "MM_DL3"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia4", "MM_DL4"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia5", "MM_DL5"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia6", "MM_DL6"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia7", "MM_DL7"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia8", "MM_DL8"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia9", "MM_DL9"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia10", "MM_DL10"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia11", "MM_DL11"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia12", "MM_DL12"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia13", "MM_DL13"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia14", "MM_DL14"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia15", "MM_DL15"},
|
||||||
|
{"DISPLAY_PORT Mixer", "MultiMedia16", "MM_DL16"},
|
||||||
|
{"DISPLAY_PORT", NULL, "DISPLAY_PORT Mixer"},
|
||||||
|
|
||||||
{"SPDIF_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
|
{"SPDIF_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
|
||||||
{"SPDIF_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
|
{"SPDIF_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
|
||||||
{"SPDIF_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
|
{"SPDIF_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
|
||||||
|
@ -9517,6 +9602,9 @@ static const struct snd_soc_dapm_route intercon[] = {
|
||||||
{"HDMI_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
|
{"HDMI_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
|
||||||
{"HDMI", NULL, "HDMI_RX Port Mixer"},
|
{"HDMI", NULL, "HDMI_RX Port Mixer"},
|
||||||
|
|
||||||
|
{"DISPLAY_PORT_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
|
||||||
|
{"DISPLAY_PORT", NULL, "DISPLAY_PORT_RX Port Mixer"},
|
||||||
|
|
||||||
{"SEC_I2S_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
|
{"SEC_I2S_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
|
||||||
{"SEC_I2S_RX", NULL, "SEC_I2S_RX Port Mixer"},
|
{"SEC_I2S_RX", NULL, "SEC_I2S_RX Port Mixer"},
|
||||||
|
|
||||||
|
@ -9571,6 +9659,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
||||||
{"BE_OUT", NULL, "SLIMBUS_8_RX"},
|
{"BE_OUT", NULL, "SLIMBUS_8_RX"},
|
||||||
{"BE_OUT", NULL, "USB_AUDIO_RX"},
|
{"BE_OUT", NULL, "USB_AUDIO_RX"},
|
||||||
{"BE_OUT", NULL, "HDMI"},
|
{"BE_OUT", NULL, "HDMI"},
|
||||||
|
{"BE_OUT", NULL, "DISPLAY_PORT"},
|
||||||
{"BE_OUT", NULL, "SPDIF_RX"},
|
{"BE_OUT", NULL, "SPDIF_RX"},
|
||||||
{"BE_OUT", NULL, "MI2S_RX"},
|
{"BE_OUT", NULL, "MI2S_RX"},
|
||||||
{"BE_OUT", NULL, "QUAT_MI2S_RX"},
|
{"BE_OUT", NULL, "QUAT_MI2S_RX"},
|
||||||
|
@ -9886,7 +9975,7 @@ static int msm_routing_send_device_pp_params(int port_id, int copp_idx)
|
||||||
|
|
||||||
pr_debug("%s: port_id %d, copp_idx %d\n", __func__, port_id, copp_idx);
|
pr_debug("%s: port_id %d, copp_idx %d\n", __func__, port_id, copp_idx);
|
||||||
|
|
||||||
if (port_id != HDMI_RX) {
|
if (port_id != HDMI_RX && port_id != DISPLAY_PORT_RX) {
|
||||||
pr_err("%s: Device pp params on invalid port %d\n",
|
pr_err("%s: Device pp params on invalid port %d\n",
|
||||||
__func__, port_id);
|
__func__, port_id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -9959,7 +10048,7 @@ static int msm_routing_put_device_pp_params_mixer(struct snd_kcontrol *kcontrol,
|
||||||
|
|
||||||
for (be_idx = 0; be_idx < MSM_BACKEND_DAI_MAX; be_idx++) {
|
for (be_idx = 0; be_idx < MSM_BACKEND_DAI_MAX; be_idx++) {
|
||||||
port_id = msm_bedais[be_idx].port_id;
|
port_id = msm_bedais[be_idx].port_id;
|
||||||
if (port_id == HDMI_RX)
|
if (port_id == HDMI_RX || port_id == DISPLAY_PORT_RX)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#define LPASS_BE_SLIMBUS_0_RX "SLIMBUS_0_RX"
|
#define LPASS_BE_SLIMBUS_0_RX "SLIMBUS_0_RX"
|
||||||
#define LPASS_BE_SLIMBUS_0_TX "SLIMBUS_0_TX"
|
#define LPASS_BE_SLIMBUS_0_TX "SLIMBUS_0_TX"
|
||||||
#define LPASS_BE_HDMI "HDMI"
|
#define LPASS_BE_HDMI "HDMI"
|
||||||
|
#define LPASS_BE_DISPLAY_PORT "DISPLAY_PORT"
|
||||||
#define LPASS_BE_INT_BT_SCO_RX "INT_BT_SCO_RX"
|
#define LPASS_BE_INT_BT_SCO_RX "INT_BT_SCO_RX"
|
||||||
#define LPASS_BE_INT_BT_SCO_TX "INT_BT_SCO_TX"
|
#define LPASS_BE_INT_BT_SCO_TX "INT_BT_SCO_TX"
|
||||||
#define LPASS_BE_INT_BT_A2DP_RX "INT_BT_A2DP_RX"
|
#define LPASS_BE_INT_BT_A2DP_RX "INT_BT_A2DP_RX"
|
||||||
|
@ -311,6 +312,7 @@ enum {
|
||||||
MSM_BACKEND_DAI_SLIMBUS_8_TX,
|
MSM_BACKEND_DAI_SLIMBUS_8_TX,
|
||||||
MSM_BACKEND_DAI_USB_RX,
|
MSM_BACKEND_DAI_USB_RX,
|
||||||
MSM_BACKEND_DAI_USB_TX,
|
MSM_BACKEND_DAI_USB_TX,
|
||||||
|
MSM_BACKEND_DAI_DISPLAY_PORT_RX,
|
||||||
MSM_BACKEND_DAI_MAX,
|
MSM_BACKEND_DAI_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -339,7 +341,7 @@ enum {
|
||||||
#define RELEASE_LOCK 0
|
#define RELEASE_LOCK 0
|
||||||
#define ACQUIRE_LOCK 1
|
#define ACQUIRE_LOCK 1
|
||||||
|
|
||||||
#define MSM_BACKEND_DAI_PP_PARAMS_REQ_MAX 1
|
#define MSM_BACKEND_DAI_PP_PARAMS_REQ_MAX 2
|
||||||
#define HDMI_RX_ID 0x8001
|
#define HDMI_RX_ID 0x8001
|
||||||
#define ADM_PP_PARAM_MUTE_ID 0
|
#define ADM_PP_PARAM_MUTE_ID 0
|
||||||
#define ADM_PP_PARAM_MUTE_BIT 1
|
#define ADM_PP_PARAM_MUTE_BIT 1
|
||||||
|
|
|
@ -423,6 +423,7 @@ int afe_get_port_type(u16 port_id)
|
||||||
case SECONDARY_I2S_RX:
|
case SECONDARY_I2S_RX:
|
||||||
case MI2S_RX:
|
case MI2S_RX:
|
||||||
case HDMI_RX:
|
case HDMI_RX:
|
||||||
|
case DISPLAY_PORT_RX:
|
||||||
case AFE_PORT_ID_SPDIF_RX:
|
case AFE_PORT_ID_SPDIF_RX:
|
||||||
case SLIMBUS_0_RX:
|
case SLIMBUS_0_RX:
|
||||||
case SLIMBUS_1_RX:
|
case SLIMBUS_1_RX:
|
||||||
|
@ -574,6 +575,7 @@ int afe_sizeof_cfg_cmd(u16 port_id)
|
||||||
ret_size = SIZEOF_CFG_CMD(afe_param_id_i2s_cfg);
|
ret_size = SIZEOF_CFG_CMD(afe_param_id_i2s_cfg);
|
||||||
break;
|
break;
|
||||||
case HDMI_RX:
|
case HDMI_RX:
|
||||||
|
case DISPLAY_PORT_RX:
|
||||||
ret_size =
|
ret_size =
|
||||||
SIZEOF_CFG_CMD(afe_param_id_hdmi_multi_chan_audio_cfg);
|
SIZEOF_CFG_CMD(afe_param_id_hdmi_multi_chan_audio_cfg);
|
||||||
break;
|
break;
|
||||||
|
@ -2897,6 +2899,7 @@ static int __afe_port_start(u16 port_id, union afe_port_config *afe_config,
|
||||||
cfg_type = AFE_PARAM_ID_I2S_CONFIG;
|
cfg_type = AFE_PARAM_ID_I2S_CONFIG;
|
||||||
break;
|
break;
|
||||||
case HDMI_RX:
|
case HDMI_RX:
|
||||||
|
case DISPLAY_PORT_RX:
|
||||||
cfg_type = AFE_PARAM_ID_HDMI_CONFIG;
|
cfg_type = AFE_PARAM_ID_HDMI_CONFIG;
|
||||||
break;
|
break;
|
||||||
case VOICE_PLAYBACK_TX:
|
case VOICE_PLAYBACK_TX:
|
||||||
|
@ -3073,6 +3076,7 @@ int afe_get_port_index(u16 port_id)
|
||||||
case MI2S_RX: return IDX_MI2S_RX;
|
case MI2S_RX: return IDX_MI2S_RX;
|
||||||
case MI2S_TX: return IDX_MI2S_TX;
|
case MI2S_TX: return IDX_MI2S_TX;
|
||||||
case HDMI_RX: return IDX_HDMI_RX;
|
case HDMI_RX: return IDX_HDMI_RX;
|
||||||
|
case DISPLAY_PORT_RX: return IDX_DISPLAY_PORT_RX;
|
||||||
case AFE_PORT_ID_SPDIF_RX: return IDX_SPDIF_RX;
|
case AFE_PORT_ID_SPDIF_RX: return IDX_SPDIF_RX;
|
||||||
case RSVD_2: return IDX_RSVD_2;
|
case RSVD_2: return IDX_RSVD_2;
|
||||||
case RSVD_3: return IDX_RSVD_3;
|
case RSVD_3: return IDX_RSVD_3;
|
||||||
|
@ -3352,6 +3356,7 @@ int afe_open(u16 port_id,
|
||||||
cfg_type = AFE_PARAM_ID_I2S_CONFIG;
|
cfg_type = AFE_PARAM_ID_I2S_CONFIG;
|
||||||
break;
|
break;
|
||||||
case HDMI_RX:
|
case HDMI_RX:
|
||||||
|
case DISPLAY_PORT_RX:
|
||||||
cfg_type = AFE_PARAM_ID_HDMI_CONFIG;
|
cfg_type = AFE_PARAM_ID_HDMI_CONFIG;
|
||||||
break;
|
break;
|
||||||
case SLIMBUS_0_RX:
|
case SLIMBUS_0_RX:
|
||||||
|
@ -4809,6 +4814,7 @@ int afe_validate_port(u16 port_id)
|
||||||
case MI2S_RX:
|
case MI2S_RX:
|
||||||
case MI2S_TX:
|
case MI2S_TX:
|
||||||
case HDMI_RX:
|
case HDMI_RX:
|
||||||
|
case DISPLAY_PORT_RX:
|
||||||
case AFE_PORT_ID_SPDIF_RX:
|
case AFE_PORT_ID_SPDIF_RX:
|
||||||
case RSVD_2:
|
case RSVD_2:
|
||||||
case RSVD_3:
|
case RSVD_3:
|
||||||
|
|
|
@ -37,6 +37,7 @@ int q6audio_get_port_index(u16 port_id)
|
||||||
case MI2S_RX: return IDX_MI2S_RX;
|
case MI2S_RX: return IDX_MI2S_RX;
|
||||||
case MI2S_TX: return IDX_MI2S_TX;
|
case MI2S_TX: return IDX_MI2S_TX;
|
||||||
case HDMI_RX: return IDX_HDMI_RX;
|
case HDMI_RX: return IDX_HDMI_RX;
|
||||||
|
case DISPLAY_PORT_RX: return IDX_DISPLAY_PORT_RX;
|
||||||
case AFE_PORT_ID_SPDIF_RX: return IDX_SPDIF_RX;
|
case AFE_PORT_ID_SPDIF_RX: return IDX_SPDIF_RX;
|
||||||
case RSVD_2: return IDX_RSVD_2;
|
case RSVD_2: return IDX_RSVD_2;
|
||||||
case RSVD_3: return IDX_RSVD_3;
|
case RSVD_3: return IDX_RSVD_3;
|
||||||
|
@ -246,6 +247,8 @@ int q6audio_get_port_id(u16 port_id)
|
||||||
case MI2S_RX: return AFE_PORT_ID_PRIMARY_MI2S_RX;
|
case MI2S_RX: return AFE_PORT_ID_PRIMARY_MI2S_RX;
|
||||||
case MI2S_TX: return AFE_PORT_ID_PRIMARY_MI2S_TX;
|
case MI2S_TX: return AFE_PORT_ID_PRIMARY_MI2S_TX;
|
||||||
case HDMI_RX: return AFE_PORT_ID_MULTICHAN_HDMI_RX;
|
case HDMI_RX: return AFE_PORT_ID_MULTICHAN_HDMI_RX;
|
||||||
|
case DISPLAY_PORT_RX:
|
||||||
|
return AFE_PORT_ID_HDMI_OVER_DP_RX;
|
||||||
case AFE_PORT_ID_SPDIF_RX: return AFE_PORT_ID_SPDIF_RX;
|
case AFE_PORT_ID_SPDIF_RX: return AFE_PORT_ID_SPDIF_RX;
|
||||||
case RSVD_2: return IDX_RSVD_2;
|
case RSVD_2: return IDX_RSVD_2;
|
||||||
case RSVD_3: return IDX_RSVD_3;
|
case RSVD_3: return IDX_RSVD_3;
|
||||||
|
@ -573,6 +576,7 @@ int q6audio_validate_port(u16 port_id)
|
||||||
case MI2S_RX:
|
case MI2S_RX:
|
||||||
case MI2S_TX:
|
case MI2S_TX:
|
||||||
case HDMI_RX:
|
case HDMI_RX:
|
||||||
|
case DISPLAY_PORT_RX:
|
||||||
case RSVD_2:
|
case RSVD_2:
|
||||||
case RSVD_3:
|
case RSVD_3:
|
||||||
case DIGI_MIC_TX:
|
case DIGI_MIC_TX:
|
||||||
|
|
Loading…
Add table
Reference in a new issue