1. 08 8月, 2016 2 次提交
    • K
      ASoC: codec duplicated callback function goes to component on hdmi-codec · 88b0f761
      Kuninori Morimoto 提交于
      codec driver and component driver has duplicated callback functions,
      and codec side functions are just copied to component side when
      register timing. This was quick-hack, but no longer needed.
      This patch moves these functions from codec driver to component driver.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      88b0f761
    • K
      ASoC: hdmi-codec: enable multi probe for same device · 9731f82d
      Kuninori Morimoto 提交于
      hdmi-codec driver is common HDMI sound driver,
      but it doesn't care about multi sound ports.
      For example, hdmi-codec driver is supporting 1 I2S and 1 SPDIF ports,
      so, we can't use this driver if HDMI has 2 or more I2S ports.
      
      And we would like to use multi detection.
      For example, DesignWare HDMI driver is providing dw_hdmi_bind() to
      DRM/KMS driver, and it will setups HDMI video/sound.
      Note is that it will be called under for_each loop of ports.
      
      int dw_hdmi_bind(xxx)
      {
              /* register hdmi-codec driver here */
      }
      
      static int xxx_probe(struct platform_device *pdev)
      {
              for_each_xxx(xx) {
                      ...
                      dw_hdmi_bind(xxx);
                      ...
              }
      }
      
      This case, dw_hdmi_bind() would like to use hdmi-codec,
      and it will be called multiple times for each ports.
      
      Here, ASoC's CPU/Codec/Card bind will checks each "of_node" on DT,
      and hdmi-codec driver is assuming its parent device for it.
      But it doesn't care about case.
      Thus, ASoC never detect correct sound card in this case.
      
      To solve this issue, this patch checks each parent device,
      and names "hdmi-hifi.x" in order to each ports.
      And uses struct snd_soc_component_driver :: of_xlate_dai_name
      for snd_soc_get_dai_name().
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      9731f82d
  2. 28 6月, 2016 1 次提交
    • K
      ASoC: hdmi-codec: callback function will be called with private data · efc9194b
      Kuninori Morimoto 提交于
      Current hdmi-codec driver is assuming that it will be registered
      from HDMI driver. Because of this assumption, each callback function
      has struct device pointer which is parent device (= HDMI).
      Then, it can use dev_get_drvdata() to get private data.
      
      OTOH, on some SoC/HDMI case, SoC has VIDEO/SOUND and HDMI IPs.
      This case, it needs SoC VIDEO, SoC SOUND and HDMI video, HDMI codec
      driver. In DesignWare HDMI IP case, SoC VIDEO (= DRM/KMS) driver tries
      to bind DesignWare HDMI video driver, and HDMI codec driver
      (= hdmi-codec). This case, above "parent device" of HDMI codec driver
      is DRM/KMS driver and its "device" already has private data.
      
      And, from DT and ASoC CPU/Codec/Card binding point of view, HDMI codec
      (= hdmi-codec) needs to have "parent device" (= DRM/KMS), otherwise,
      it never detect sound card.
      
      Because of these reasons, some driver can't use dev_get_drvdata() to
      get private data on hdmi-codec driver. This patch add new void pointer
      on hdmi_codec_pdata for private data, and callback function will be
      called with it.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      efc9194b
  3. 22 4月, 2016 2 次提交
  4. 19 4月, 2016 1 次提交