Loading sound/soc/codecs/ad193x.c +2 −4 Original line number Diff line number Diff line Loading @@ -240,10 +240,8 @@ static int ad193x_set_dai_fmt(struct snd_soc_dai *codec_dai, } /* For DSP_*, LRCLK's polarity must be inverted */ if (fmt & SND_SOC_DAIFMT_DSP_A) { change_bit(ffs(AD193X_DAC_LEFT_HIGH) - 1, (unsigned long *)&dac_fmt); } if (fmt & SND_SOC_DAIFMT_DSP_A) dac_fmt ^= AD193X_DAC_LEFT_HIGH; switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: /* codec clk & frm master */ Loading sound/soc/codecs/hdac_hdmi.c +31 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,29 @@ static struct hdac_hdmi_port *hdac_hdmi_get_port_from_cvt( return NULL; } /* * Go through all converters and ensure connection is set to * the correct pin as set via kcontrols. */ static void hdac_hdmi_verify_connect_sel_all_pins(struct hdac_device *hdev) { struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); struct hdac_hdmi_port *port; struct hdac_hdmi_cvt *cvt; int cvt_idx = 0; list_for_each_entry(cvt, &hdmi->cvt_list, head) { port = hdac_hdmi_get_port_from_cvt(hdev, hdmi, cvt); if (port && port->pin) { snd_hdac_codec_write(hdev, port->pin->nid, 0, AC_VERB_SET_CONNECT_SEL, cvt_idx); dev_dbg(&hdev->dev, "%s: %s set connect %d -> %d\n", __func__, cvt->name, port->pin->nid, cvt_idx); } ++cvt_idx; } } /* * This tries to get a valid pin and set the HW constraints based on the * ELD. Even if a valid pin is not found return success so that device open Loading Loading @@ -798,6 +821,14 @@ static int hdac_hdmi_cvt_output_widget_event(struct snd_soc_dapm_widget *w, AC_VERB_SET_CHANNEL_STREAMID, pcm->stream_tag); snd_hdac_codec_write(hdev, cvt->nid, 0, AC_VERB_SET_STREAM_FORMAT, pcm->format); /* * The connection indices are shared by all converters and * may interfere with each other. Ensure correct * routing for all converters at stream start. */ hdac_hdmi_verify_connect_sel_all_pins(hdev); break; case SND_SOC_DAPM_POST_PMD: Loading sound/soc/codecs/nau8825.c +4 −0 Original line number Diff line number Diff line Loading @@ -1880,6 +1880,10 @@ static void nau8825_init_regs(struct nau8825 *nau8825) NAU8825_JACK_EJECT_DEBOUNCE_MASK, nau8825->jack_eject_debounce << NAU8825_JACK_EJECT_DEBOUNCE_SFT); /* Pull up IRQ pin */ regmap_update_bits(regmap, NAU8825_REG_INTERRUPT_MASK, NAU8825_IRQ_PIN_PULLUP | NAU8825_IRQ_PIN_PULL_EN, NAU8825_IRQ_PIN_PULLUP | NAU8825_IRQ_PIN_PULL_EN); /* Mask unneeded IRQs: 1 - disable, 0 - enable */ regmap_update_bits(regmap, NAU8825_REG_INTERRUPT_MASK, 0x7ff, 0x7ff); Loading sound/soc/codecs/nau8825.h +2 −0 Original line number Diff line number Diff line Loading @@ -168,6 +168,8 @@ #define NAU8825_JACK_POLARITY (1 << 1) /* 0 - active low, 1 - active high */ /* INTERRUPT_MASK (0xf) */ #define NAU8825_IRQ_PIN_PULLUP (1 << 14) #define NAU8825_IRQ_PIN_PULL_EN (1 << 13) #define NAU8825_IRQ_OUTPUT_EN (1 << 11) #define NAU8825_IRQ_HEADSET_COMPLETE_EN (1 << 10) #define NAU8825_IRQ_RMS_EN (1 << 8) Loading sound/soc/generic/audio-graph-card.c +3 −3 Original line number Diff line number Diff line Loading @@ -435,9 +435,6 @@ static int graph_for_each_link(struct asoc_simple_priv *priv, codec_ep = of_graph_get_remote_endpoint(cpu_ep); codec_port = of_get_parent(codec_ep); of_node_put(codec_ep); of_node_put(codec_port); /* get convert-xxx property */ memset(&adata, 0, sizeof(adata)); graph_parse_convert(dev, codec_ep, &adata); Loading @@ -457,6 +454,9 @@ static int graph_for_each_link(struct asoc_simple_priv *priv, else ret = func_noml(priv, cpu_ep, codec_ep, li); of_node_put(codec_ep); of_node_put(codec_port); if (ret < 0) return ret; Loading Loading
sound/soc/codecs/ad193x.c +2 −4 Original line number Diff line number Diff line Loading @@ -240,10 +240,8 @@ static int ad193x_set_dai_fmt(struct snd_soc_dai *codec_dai, } /* For DSP_*, LRCLK's polarity must be inverted */ if (fmt & SND_SOC_DAIFMT_DSP_A) { change_bit(ffs(AD193X_DAC_LEFT_HIGH) - 1, (unsigned long *)&dac_fmt); } if (fmt & SND_SOC_DAIFMT_DSP_A) dac_fmt ^= AD193X_DAC_LEFT_HIGH; switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: /* codec clk & frm master */ Loading
sound/soc/codecs/hdac_hdmi.c +31 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,29 @@ static struct hdac_hdmi_port *hdac_hdmi_get_port_from_cvt( return NULL; } /* * Go through all converters and ensure connection is set to * the correct pin as set via kcontrols. */ static void hdac_hdmi_verify_connect_sel_all_pins(struct hdac_device *hdev) { struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); struct hdac_hdmi_port *port; struct hdac_hdmi_cvt *cvt; int cvt_idx = 0; list_for_each_entry(cvt, &hdmi->cvt_list, head) { port = hdac_hdmi_get_port_from_cvt(hdev, hdmi, cvt); if (port && port->pin) { snd_hdac_codec_write(hdev, port->pin->nid, 0, AC_VERB_SET_CONNECT_SEL, cvt_idx); dev_dbg(&hdev->dev, "%s: %s set connect %d -> %d\n", __func__, cvt->name, port->pin->nid, cvt_idx); } ++cvt_idx; } } /* * This tries to get a valid pin and set the HW constraints based on the * ELD. Even if a valid pin is not found return success so that device open Loading Loading @@ -798,6 +821,14 @@ static int hdac_hdmi_cvt_output_widget_event(struct snd_soc_dapm_widget *w, AC_VERB_SET_CHANNEL_STREAMID, pcm->stream_tag); snd_hdac_codec_write(hdev, cvt->nid, 0, AC_VERB_SET_STREAM_FORMAT, pcm->format); /* * The connection indices are shared by all converters and * may interfere with each other. Ensure correct * routing for all converters at stream start. */ hdac_hdmi_verify_connect_sel_all_pins(hdev); break; case SND_SOC_DAPM_POST_PMD: Loading
sound/soc/codecs/nau8825.c +4 −0 Original line number Diff line number Diff line Loading @@ -1880,6 +1880,10 @@ static void nau8825_init_regs(struct nau8825 *nau8825) NAU8825_JACK_EJECT_DEBOUNCE_MASK, nau8825->jack_eject_debounce << NAU8825_JACK_EJECT_DEBOUNCE_SFT); /* Pull up IRQ pin */ regmap_update_bits(regmap, NAU8825_REG_INTERRUPT_MASK, NAU8825_IRQ_PIN_PULLUP | NAU8825_IRQ_PIN_PULL_EN, NAU8825_IRQ_PIN_PULLUP | NAU8825_IRQ_PIN_PULL_EN); /* Mask unneeded IRQs: 1 - disable, 0 - enable */ regmap_update_bits(regmap, NAU8825_REG_INTERRUPT_MASK, 0x7ff, 0x7ff); Loading
sound/soc/codecs/nau8825.h +2 −0 Original line number Diff line number Diff line Loading @@ -168,6 +168,8 @@ #define NAU8825_JACK_POLARITY (1 << 1) /* 0 - active low, 1 - active high */ /* INTERRUPT_MASK (0xf) */ #define NAU8825_IRQ_PIN_PULLUP (1 << 14) #define NAU8825_IRQ_PIN_PULL_EN (1 << 13) #define NAU8825_IRQ_OUTPUT_EN (1 << 11) #define NAU8825_IRQ_HEADSET_COMPLETE_EN (1 << 10) #define NAU8825_IRQ_RMS_EN (1 << 8) Loading
sound/soc/generic/audio-graph-card.c +3 −3 Original line number Diff line number Diff line Loading @@ -435,9 +435,6 @@ static int graph_for_each_link(struct asoc_simple_priv *priv, codec_ep = of_graph_get_remote_endpoint(cpu_ep); codec_port = of_get_parent(codec_ep); of_node_put(codec_ep); of_node_put(codec_port); /* get convert-xxx property */ memset(&adata, 0, sizeof(adata)); graph_parse_convert(dev, codec_ep, &adata); Loading @@ -457,6 +454,9 @@ static int graph_for_each_link(struct asoc_simple_priv *priv, else ret = func_noml(priv, cpu_ep, codec_ep, li); of_node_put(codec_ep); of_node_put(codec_port); if (ret < 0) return ret; Loading