Re: [PATCH 1/3 v2] drm/i2c/adv7511: Add audio support
Hi Laurent, On 04-04-2016 22:41, Laurent Pinchart wrote: > Hi Jose, > > On Monday 04 Apr 2016 10:05:39 Jose Abreu wrote: >> On 01-04-2016 18:10, Laurent Pinchart wrote: >>> On Monday 28 Mar 2016 15:36:09 Jose Abreu wrote: This patch adds audio support for the ADV7511 HDMI transmitter using ALSA SoC. The code was ported from Analog Devices linux tree from commit 1770c4a1e32b ("Merge remote-tracking branch 'xilinx/master' into xcomm_zynq"), which is available at: - https://github.com/analogdevicesinc/linux/ The main core file was renamed from adv7511.c to adv7511_core.c so that audio and video compile into a single adv7511.ko module and to keep up with Analog Devices kernel tree. The audio can be disabled using menu-config so it is possible to use only video mode. The HDMI mode is automatically started at boot and the audio (when enabled) registers as a codec into ALSA. SPDIF DAI format was also added to ASoC as it is required by adv7511 audio. Signed-off-by: Jose Abreu --- No changes v1 -> v2. drivers/gpu/drm/i2c/Kconfig | 11 + drivers/gpu/drm/i2c/Makefile|2 + drivers/gpu/drm/i2c/adv7511.c | 1024 drivers/gpu/drm/i2c/adv7511.h | 41 ++ drivers/gpu/drm/i2c/adv7511_audio.c | 310 +++ drivers/gpu/drm/i2c/adv7511_core.c | 1005 >>> Please use git-format-patch -M to detect renames if you send a new version >>> of this series, it will help with review. >> Ok, will do that in next version. >> include/sound/soc-dai.h |1 + 7 files changed, 1370 insertions(+), 1024 deletions(-) delete mode 100644 drivers/gpu/drm/i2c/adv7511.c create mode 100644 drivers/gpu/drm/i2c/adv7511_audio.c create mode 100644 drivers/gpu/drm/i2c/adv7511_core.c >>> [snip] >>> diff --git a/drivers/gpu/drm/i2c/adv7511_core.c b/drivers/gpu/drm/i2c/adv7511_core.c new file mode 100644 index 000..d54256a --- /dev/null +++ b/drivers/gpu/drm/i2c/adv7511_core.c >>> [snip] >>> +static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id) +{ + struct adv7511_link_config link_config; + struct adv7511 *adv7511; + struct device *dev = &i2c->dev; + unsigned int val; + int ret; + + if (!dev->of_node) + return -EINVAL; + + adv7511 = devm_kzalloc(dev, sizeof(*adv7511), GFP_KERNEL); + if (!adv7511) + return -ENOMEM; + + adv7511->powered = false; + adv7511->status = connector_status_disconnected; + + ret = adv7511_parse_dt(dev->of_node, &link_config); + if (ret) + return ret; + + /* + * The power down GPIO is optional. If present, toggle it from active to + * inactive to wake up the encoder. + */ + adv7511->gpio_pd = devm_gpiod_get_optional(dev, "pd", > GPIOD_OUT_HIGH); + if (IS_ERR(adv7511->gpio_pd)) + return PTR_ERR(adv7511->gpio_pd); + + if (adv7511->gpio_pd) { + mdelay(5); + gpiod_set_value_cansleep(adv7511->gpio_pd, 0); + } + + adv7511->regmap = devm_regmap_init_i2c(i2c, &adv7511_regmap_config); + if (IS_ERR(adv7511->regmap)) + return PTR_ERR(adv7511->regmap); + + ret = regmap_read(adv7511->regmap, ADV7511_REG_CHIP_REVISION, &val); + if (ret) + return ret; + dev_dbg(dev, "Rev. %d\n", val); + + ret = regmap_register_patch(adv7511->regmap, adv7511_fixed_registers, + ARRAY_SIZE(adv7511_fixed_registers)); + if (ret) + return ret; + + regmap_write(adv7511->regmap, ADV7511_REG_EDID_I2C_ADDR, edid_i2c_addr); + regmap_write(adv7511->regmap, ADV7511_REG_PACKET_I2C_ADDR, + packet_i2c_addr); + regmap_write(adv7511->regmap, ADV7511_REG_CEC_I2C_ADDR, > cec_i2c_addr); + adv7511_packet_disable(adv7511, 0x); + + adv7511->i2c_main = i2c; + adv7511->i2c_edid = i2c_new_dummy(i2c->adapter, edid_i2c_addr >> 1); + if (!adv7511->i2c_edid) + return -ENOMEM; + + if (i2c->irq) { + init_waitqueue_head(&adv7511->wq); + + ret = devm_request_threaded_irq(dev, i2c->irq, NULL, + adv7511_irq_handler, + IRQF_ONESHOT, dev_name(dev), + adv7511); + if (ret) + goto err_i2c_unregister_device; + } + + /* CEC is unused for now */ + regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL, + ADV7511_CEC_CTRL_POWER_D
Re: [PATCH 1/3 v2] drm/i2c/adv7511: Add audio support
Hi Jose, On Tuesday 05 Apr 2016 12:00:54 Jose Abreu wrote: > On 04-04-2016 22:41, Laurent Pinchart wrote: > > On Monday 04 Apr 2016 10:05:39 Jose Abreu wrote: > >> On 01-04-2016 18:10, Laurent Pinchart wrote: > >>> On Monday 28 Mar 2016 15:36:09 Jose Abreu wrote: > This patch adds audio support for the ADV7511 HDMI transmitter > using ALSA SoC. > > The code was ported from Analog Devices linux tree from > commit 1770c4a1e32b ("Merge remote-tracking branch > > 'xilinx/master' into xcomm_zynq"), which is available at: > - https://github.com/analogdevicesinc/linux/ > > The main core file was renamed from adv7511.c to adv7511_core.c > so that audio and video compile into a single adv7511.ko module > and to keep up with Analog Devices kernel tree. > > The audio can be disabled using menu-config so it is possible > to use only video mode. > > The HDMI mode is automatically started at boot and the audio > (when enabled) registers as a codec into ALSA. > > SPDIF DAI format was also added to ASoC as it is required > by adv7511 audio. > > Signed-off-by: Jose Abreu > --- > > No changes v1 -> v2. > > drivers/gpu/drm/i2c/Kconfig | 11 + > drivers/gpu/drm/i2c/Makefile|2 + > drivers/gpu/drm/i2c/adv7511.c | 1024 > > drivers/gpu/drm/i2c/adv7511.h | 41 ++ > drivers/gpu/drm/i2c/adv7511_audio.c | 310 +++ > drivers/gpu/drm/i2c/adv7511_core.c | 1005 > > >>> > >>> Please use git-format-patch -M to detect renames if you send a new > >>> version > >>> of this series, it will help with review. > >> > >> Ok, will do that in next version. > >> > include/sound/soc-dai.h |1 + > 7 files changed, 1370 insertions(+), 1024 deletions(-) > delete mode 100644 drivers/gpu/drm/i2c/adv7511.c > create mode 100644 drivers/gpu/drm/i2c/adv7511_audio.c > create mode 100644 drivers/gpu/drm/i2c/adv7511_core.c > >>> > >>> [snip] > >>> > diff --git a/drivers/gpu/drm/i2c/adv7511_core.c > b/drivers/gpu/drm/i2c/adv7511_core.c new file mode 100644 > index 000..d54256a > --- /dev/null > +++ b/drivers/gpu/drm/i2c/adv7511_core.c > >>> > >>> [snip] > >>> > +static int adv7511_probe(struct i2c_client *i2c, const struct > i2c_device_id *id) +{ > +struct adv7511_link_config link_config; > +struct adv7511 *adv7511; > +struct device *dev = &i2c->dev; > +unsigned int val; > +int ret; > + > +if (!dev->of_node) > +return -EINVAL; > + > +adv7511 = devm_kzalloc(dev, sizeof(*adv7511), GFP_KERNEL); > +if (!adv7511) > +return -ENOMEM; > + > +adv7511->powered = false; > +adv7511->status = connector_status_disconnected; > + > +ret = adv7511_parse_dt(dev->of_node, &link_config); > +if (ret) > +return ret; > + > +/* > + * The power down GPIO is optional. If present, toggle it from > active > to > + * inactive to wake up the encoder. > + */ > +adv7511->gpio_pd = devm_gpiod_get_optional(dev, "pd", > > > > GPIOD_OUT_HIGH); > > > +if (IS_ERR(adv7511->gpio_pd)) > +return PTR_ERR(adv7511->gpio_pd); > + > +if (adv7511->gpio_pd) { > +mdelay(5); > +gpiod_set_value_cansleep(adv7511->gpio_pd, 0); > +} > + > +adv7511->regmap = devm_regmap_init_i2c(i2c, > &adv7511_regmap_config); > +if (IS_ERR(adv7511->regmap)) > +return PTR_ERR(adv7511->regmap); > + > +ret = regmap_read(adv7511->regmap, ADV7511_REG_CHIP_REVISION, > &val); > +if (ret) > +return ret; > +dev_dbg(dev, "Rev. %d\n", val); > + > +ret = regmap_register_patch(adv7511->regmap, > adv7511_fixed_registers, > + > ARRAY_SIZE(adv7511_fixed_registers)); > +if (ret) > +return ret; > + > +regmap_write(adv7511->regmap, ADV7511_REG_EDID_I2C_ADDR, > edid_i2c_addr); > +regmap_write(adv7511->regmap, ADV7511_REG_PACKET_I2C_ADDR, > + packet_i2c_addr); > +regmap_write(adv7511->regmap, ADV7511_REG_CEC_I2C_ADDR, > > > > cec_i2c_addr); > > > +adv7511_packet_disable(adv7511, 0x); > + > +adv7511->i2c_main = i2c; > +adv7511->i2c_edid = i2c_new_dummy(i2c->adapter, edid_i2c_addr > >> 1); > +
[PATCH 0/3 v3] Add I2S/ADV7511 audio support for ARC AXS10x boards
ARC AXS10x platforms consist of a mainboard with several peripherals. One of those peripherals is an HDMI output port controlled by the ADV7511 transmitter. This patch set adds audio for the ADV7511 transmitter and I2S audio for the AXS10x platform. Changes v2 -> v3: * Removed pll_config functions (as suggested by Alexey Brodkin) * Removed HDMI start at adv7511_core (as suggested by Archit Taneja) * Use NOP functions for adv7511_audio (as suggested by Archit Taneja) * Added adv7511_audio_exit() function (as suggested by Archit Taneja) * Moved adv7511 to its own folder (as suggested by Archit Taneja) * Separated file rename of adv7511_core (as suggested by Emil Velikov) * Compile adv7511 as module if ALSA SoC is compiled as module * Load adv7511 audio only if declared in device tree (as suggested by Laurent Pinchart) * Dropped custom platform driver, using now ALSA DMA engine * Dropped IRQ handler for I2S Changes v1 -> v2: * DT bindings moved to separate patch (as suggested by Alexey Brodkin) * Removed defconfigs entries (as suggested by Alexey Brodkin) Jose Abreu (3): drm/i2c/adv7511: Rename and move to separate folder drm/i2c/adv7511: Add audio support ASoC: dwc: Unmask I2S interrupts only for enabled channels .../bindings/display/bridge/adi,adv7511.txt| 3 + drivers/gpu/drm/i2c/Kconfig| 6 +- drivers/gpu/drm/i2c/Makefile | 2 +- drivers/gpu/drm/i2c/adv7511/Kconfig| 18 ++ drivers/gpu/drm/i2c/adv7511/Makefile | 3 + drivers/gpu/drm/i2c/{ => adv7511}/adv7511.h| 53 drivers/gpu/drm/i2c/adv7511/adv7511_audio.c| 310 + .../drm/i2c/{adv7511.c => adv7511/adv7511_core.c} | 43 +-- include/sound/soc-dai.h| 1 + sound/soc/dwc/designware_i2s.c | 5 +- 10 files changed, 406 insertions(+), 38 deletions(-) create mode 100644 drivers/gpu/drm/i2c/adv7511/Kconfig create mode 100644 drivers/gpu/drm/i2c/adv7511/Makefile rename drivers/gpu/drm/i2c/{ => adv7511}/adv7511.h (90%) create mode 100644 drivers/gpu/drm/i2c/adv7511/adv7511_audio.c rename drivers/gpu/drm/i2c/{adv7511.c => adv7511/adv7511_core.c} (97%) -- 1.9.1 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH 1/3 v3] drm/i2c/adv7511: Rename and move to separate folder
Main file of adv7511 driver was renamed from adv7511.c to adv7511_core.c and moved to separate folder in order to prepare the adding of audio support. Struct adv7511 was moved to adv7511.h and functions adv7511_packet_enable() and adv7511_packet_disable() were made public also to prepare the adding of audio support. Signed-off-by: Jose Abreu --- This patch was only introduced in v3. drivers/gpu/drm/i2c/Kconfig| 6 +--- drivers/gpu/drm/i2c/Makefile | 2 +- drivers/gpu/drm/i2c/adv7511/Kconfig| 6 drivers/gpu/drm/i2c/adv7511/Makefile | 2 ++ drivers/gpu/drm/i2c/{ => adv7511}/adv7511.h| 31 + .../drm/i2c/{adv7511.c => adv7511/adv7511_core.c} | 32 ++ 6 files changed, 43 insertions(+), 36 deletions(-) create mode 100644 drivers/gpu/drm/i2c/adv7511/Kconfig create mode 100644 drivers/gpu/drm/i2c/adv7511/Makefile rename drivers/gpu/drm/i2c/{ => adv7511}/adv7511.h (93%) rename drivers/gpu/drm/i2c/{adv7511.c => adv7511/adv7511_core.c} (97%) diff --git a/drivers/gpu/drm/i2c/Kconfig b/drivers/gpu/drm/i2c/Kconfig index 22c7ed6..9258daf 100644 --- a/drivers/gpu/drm/i2c/Kconfig +++ b/drivers/gpu/drm/i2c/Kconfig @@ -1,11 +1,7 @@ menu "I2C encoder or helper chips" depends on DRM && DRM_KMS_HELPER && I2C -config DRM_I2C_ADV7511 - tristate "AV7511 encoder" - select REGMAP_I2C - help - Support for the Analog Device ADV7511(W) and ADV7513 HDMI encoders. +source "drivers/gpu/drm/i2c/adv7511/Kconfig" config DRM_I2C_CH7006 tristate "Chrontel ch7006 TV encoder" diff --git a/drivers/gpu/drm/i2c/Makefile b/drivers/gpu/drm/i2c/Makefile index 2c72eb5..f144830 100644 --- a/drivers/gpu/drm/i2c/Makefile +++ b/drivers/gpu/drm/i2c/Makefile @@ -1,6 +1,6 @@ ccflags-y := -Iinclude/drm -obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511.o +obj-y += adv7511/ ch7006-y := ch7006_drv.o ch7006_mode.o obj-$(CONFIG_DRM_I2C_CH7006) += ch7006.o diff --git a/drivers/gpu/drm/i2c/adv7511/Kconfig b/drivers/gpu/drm/i2c/adv7511/Kconfig new file mode 100644 index 000..302c8e34 --- /dev/null +++ b/drivers/gpu/drm/i2c/adv7511/Kconfig @@ -0,0 +1,6 @@ +config DRM_I2C_ADV7511 + tristate "AV7511 encoder" + select REGMAP_I2C + help + Support for the Analog Device ADV7511(W) and ADV7513 HDMI encoders. + diff --git a/drivers/gpu/drm/i2c/adv7511/Makefile b/drivers/gpu/drm/i2c/adv7511/Makefile new file mode 100644 index 000..c13f5a1 --- /dev/null +++ b/drivers/gpu/drm/i2c/adv7511/Makefile @@ -0,0 +1,2 @@ +adv7511-y := adv7511_core.o +obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511.o diff --git a/drivers/gpu/drm/i2c/adv7511.h b/drivers/gpu/drm/i2c/adv7511/adv7511.h similarity index 93% rename from drivers/gpu/drm/i2c/adv7511.h rename to drivers/gpu/drm/i2c/adv7511/adv7511.h index 38515b3..fcae1ee 100644 --- a/drivers/gpu/drm/i2c/adv7511.h +++ b/drivers/gpu/drm/i2c/adv7511/adv7511.h @@ -286,4 +286,35 @@ struct adv7511_video_config { struct hdmi_avi_infoframe avi_infoframe; }; +struct adv7511 { + struct i2c_client *i2c_main; + struct i2c_client *i2c_edid; + + struct regmap *regmap; + struct regmap *packet_memory_regmap; + enum drm_connector_status status; + bool powered; + + unsigned int f_tmds; + + unsigned int current_edid_segment; + uint8_t edid_buf[256]; + bool edid_read; + + wait_queue_head_t wq; + struct drm_encoder *encoder; + + bool embedded_sync; + enum adv7511_sync_polarity vsync_polarity; + enum adv7511_sync_polarity hsync_polarity; + bool rgb; + + struct edid *edid; + + struct gpio_desc *gpio_pd; +}; + +int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet); +int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int packet); + #endif /* __DRM_I2C_ADV7511_H__ */ diff --git a/drivers/gpu/drm/i2c/adv7511.c b/drivers/gpu/drm/i2c/adv7511/adv7511_core.c similarity index 97% rename from drivers/gpu/drm/i2c/adv7511.c rename to drivers/gpu/drm/i2c/adv7511/adv7511_core.c index a02112b..2b00581 100644 --- a/drivers/gpu/drm/i2c/adv7511.c +++ b/drivers/gpu/drm/i2c/adv7511/adv7511_core.c @@ -20,34 +20,6 @@ #include "adv7511.h" -struct adv7511 { - struct i2c_client *i2c_main; - struct i2c_client *i2c_edid; - - struct regmap *regmap; - struct regmap *packet_memory_regmap; - enum drm_connector_status status; - bool powered; - - unsigned int f_tmds; - - unsigned int current_edid_segment; - uint8_t edid_buf[256]; - bool edid_read; - - wait_queue_head_t wq; - struct drm_encoder *encoder; - - bool embedded_sync; - enum adv7511_sync_polarity vsync_polarity; - enum adv7511_sync_polarity hsync_polarity; - bool rgb; - - struct edid *edid; - - struct gpio_desc *gpio_pd; -}; - static struct adv7511 *encoder_to_adv7511(s
[PATCH 3/3 v3] ASoC: dwc: Unmask I2S interrupts only for enabled channels
There is no need to unmask all interrupts at I2S start. This can cause performance issues in slower platforms. Unmask only the interrupts for the used channels. Signed-off-by: Jose Abreu --- Changes v2 -> v3: * Dropped custom platform driver, using now ALSA DMA engine * Dropped IRQ handler for I2S * Removed pll_config functions (as suggested by Alexey Brodkin) No changes v1 -> v2. sound/soc/dwc/designware_i2s.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c index bff258d..3effcd1 100644 --- a/sound/soc/dwc/designware_i2s.c +++ b/sound/soc/dwc/designware_i2s.c @@ -147,17 +147,18 @@ static inline void i2s_clear_irqs(struct dw_i2s_dev *dev, u32 stream) static void i2s_start(struct dw_i2s_dev *dev, struct snd_pcm_substream *substream) { + struct i2s_clk_config_data *config = &dev->config; u32 i, irq; i2s_write_reg(dev->i2s_base, IER, 1); if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - for (i = 0; i < 4; i++) { + for (i = 0; i < (config->chan_nr / 2); i++) { irq = i2s_read_reg(dev->i2s_base, IMR(i)); i2s_write_reg(dev->i2s_base, IMR(i), irq & ~0x30); } i2s_write_reg(dev->i2s_base, ITER, 1); } else { - for (i = 0; i < 4; i++) { + for (i = 0; i < (config->chan_nr / 2); i++) { irq = i2s_read_reg(dev->i2s_base, IMR(i)); i2s_write_reg(dev->i2s_base, IMR(i), irq & ~0x03); } -- 1.9.1 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH 2/3 v3] drm/i2c/adv7511: Add audio support
This patch adds audio support for the ADV7511 HDMI transmitter using ALSA SoC. The code was ported from Analog Devices linux tree from commit 1770c4a1e32b ("Merge remote-tracking branch 'xilinx/master' into xcomm_zynq"), which is available at: - https://github.com/analogdevicesinc/linux/ The audio can be disabled using menu-config so it is possible to use only video mode. The audio (when enabled) registers as a codec into ALSA. SPDIF DAI format was also added to ASoC as it is required by adv7511 audio. Signed-off-by: Jose Abreu --- .../bindings/display/bridge/adi,adv7511.txt| 3 + drivers/gpu/drm/i2c/adv7511/Kconfig| 12 + drivers/gpu/drm/i2c/adv7511/Makefile | 1 + drivers/gpu/drm/i2c/adv7511/adv7511.h | 22 ++ drivers/gpu/drm/i2c/adv7511/adv7511_audio.c| 310 + drivers/gpu/drm/i2c/adv7511/adv7511_core.c | 11 + include/sound/soc-dai.h| 1 + 7 files changed, 360 insertions(+) create mode 100644 drivers/gpu/drm/i2c/adv7511/adv7511_audio.c diff --git a/Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt b/Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt index 96c25ee..920e542 100644 --- a/Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt +++ b/Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt @@ -43,6 +43,9 @@ Optional properties: data stream (similar to BT.656). Defaults to separate H/V synchronization signals. +- adi,enable-audio: If set the ADV7511 driver will register a codec interface + into ALSA SoC. + Required nodes: The ADV7511 has two video ports. Their connections are modelled using the OF diff --git a/drivers/gpu/drm/i2c/adv7511/Kconfig b/drivers/gpu/drm/i2c/adv7511/Kconfig index 302c8e34..900f3e9 100644 --- a/drivers/gpu/drm/i2c/adv7511/Kconfig +++ b/drivers/gpu/drm/i2c/adv7511/Kconfig @@ -4,3 +4,15 @@ config DRM_I2C_ADV7511 help Support for the Analog Device ADV7511(W) and ADV7513 HDMI encoders. +config DRM_I2C_ADV7511_AUDIO + bool "ADV7511 audio" + depends on DRM_I2C_ADV7511 + depends on SND_SOC=y || (SND_SOC && DRM_I2C_ADV7511=m) + default y + help + This adds support for audio on the ADV7511(W) and ADV7513 HDMI + encoders. + + By selecting this option the ADV7511 will register a codec interface + into ALSA. + diff --git a/drivers/gpu/drm/i2c/adv7511/Makefile b/drivers/gpu/drm/i2c/adv7511/Makefile index c13f5a1..d68773a 100644 --- a/drivers/gpu/drm/i2c/adv7511/Makefile +++ b/drivers/gpu/drm/i2c/adv7511/Makefile @@ -1,2 +1,3 @@ adv7511-y := adv7511_core.o +adv7511-$(CONFIG_DRM_I2C_ADV7511_AUDIO) += adv7511_audio.o obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511.o diff --git a/drivers/gpu/drm/i2c/adv7511/adv7511.h b/drivers/gpu/drm/i2c/adv7511/adv7511.h index fcae1ee..35828f0 100644 --- a/drivers/gpu/drm/i2c/adv7511/adv7511.h +++ b/drivers/gpu/drm/i2c/adv7511/adv7511.h @@ -10,6 +10,7 @@ #define __DRM_I2C_ADV7511_H__ #include +#include #define ADV7511_REG_CHIP_REVISION 0x00 #define ADV7511_REG_N0 0x01 @@ -241,6 +242,7 @@ enum adv7511_sync_polarity { * @sync_pulse:Select the sync pulse * @vsync_polarity:vsync input signal configuration * @hsync_polarity:hsync input signal configuration + * @enable_audio True if audio is enabled */ struct adv7511_link_config { unsigned int input_color_depth; @@ -255,6 +257,8 @@ struct adv7511_link_config { enum adv7511_input_sync_pulse sync_pulse; enum adv7511_sync_polarity vsync_polarity; enum adv7511_sync_polarity hsync_polarity; + + bool enable_audio; }; /** @@ -296,6 +300,10 @@ struct adv7511 { bool powered; unsigned int f_tmds; + unsigned int f_audio; + + unsigned int audio_source; + bool enable_audio; unsigned int current_edid_segment; uint8_t edid_buf[256]; @@ -317,4 +325,18 @@ struct adv7511 { int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet); int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int packet); +#ifdef CONFIG_DRM_I2C_ADV7511_AUDIO +int adv7511_audio_init(struct device *dev); +void adv7511_audio_exit(struct device *dev); +#else +int adv7511_audio_init(struct device *dev) +{ + return 0; +} +void adv7511_audio_exit(struct device *dev) +{ + +} +#endif + #endif /* __DRM_I2C_ADV7511_H__ */ diff --git a/drivers/gpu/drm/i2c/adv7511/adv7511_audio.c b/drivers/gpu/drm/i2c/adv7511/adv7511_audio.c new file mode 100644 index 000..5562ed5 --- /dev/null +++ b/drivers/gpu/drm/i2c/adv7511/adv7511_audio.c @@ -0,0 +1,310 @@ +/* + * Analog Devices ADV7511 HDMI transmitter driver + * + * Copyright 2012 Analog Devices Inc. + * + * Licensed under the GPL-2. + */ + +#include +#include +#include +#include +#include +#inc
RE: [PATCH 4/5 v5] arc: Add our own implementation of fb_pgprotect()
Hi Vineet, > From: Alexey Brodkin [abrod...@synopsys.com] > Sent: Monday, March 28, 2016 2:36 PM > To: dri-de...@lists.freedesktop.org > Cc: linux-ker...@vger.kernel.org; Alexey Brodkin; Vineet Gupta; > linux-snps-arc@lists.infradead.org > Subject: [PATCH 4/5 v5] arc: Add our own implementation of fb_pgprotect() > > During mmaping of frame-buffer pages to user-space > fb_protect() is called to set proper page settings. > > In case of ARC we need to mark pages that are mmaped to > user as uncached because of 2 reasons: > * Huge amount of data if passing through data cache will >thrash cache a lot making cache almost useless for other > less traffic hungry processes. > * Data written by user in FB will be immediately available for >hardware (such as PGU etc) without requirements to flush data >cache regularly. > > Signed-off-by: Alexey Brodkin > Cc: Vineet Gupta > Cc: linux-snps-arc@lists.infradead.org Could you please pick up this patch in your tree so in DRM-related series won't be external dependencies any longer? -Alexey ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH 3/3 v3] ASoC: dwc: Unmask I2S interrupts only for enabled channels
On Tue, Apr 05, 2016 at 06:08:02PM +0100, Jose Abreu wrote: > There is no need to unmask all interrupts at I2S start. This > can cause performance issues in slower platforms. > > Unmask only the interrupts for the used channels. This appears to be completely unrelated to the other two patches in the series. Please don't mix unrelated changes in a single series, it creates interdependencies that don't really exist - if you've got a separate change or set of changes send them separately. signature.asc Description: PGP signature ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc