Loading Documentation/devicetree/bindings/misc/atmel-ssc.txt +2 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ Optional properties: this parameter to choose where the clock from. - By default the clock is from TK pin, if the clock from RK pin, this property is needed. - #sound-dai-cells: Should contain <0>. - This property makes the SSC into an automatically registered DAI. Examples: - PDC transfer: Loading Documentation/devicetree/bindings/sound/axentia,tse850-pcm5142.txt +8 −3 Original line number Diff line number Diff line Loading @@ -2,8 +2,7 @@ Devicetree bindings for the Axentia TSE-850 audio complex Required properties: - compatible: "axentia,tse850-pcm5142" - axentia,ssc-controller: The phandle of the atmel SSC controller used as cpu dai. - axentia,cpu-dai: The phandle of the cpu dai. - axentia,audio-codec: The phandle of the PCM5142 codec. - axentia,add-gpios: gpio specifier that controls the mixer. - axentia,loop1-gpios: gpio specifier that controls loop relays on channel 1. Loading Loading @@ -43,6 +42,12 @@ the PCM5142 codec. Example: &ssc0 { #sound-dai-cells = <0>; status = "okay"; }; &i2c { codec: pcm5142@4c { compatible = "ti,pcm5142"; Loading Loading @@ -77,7 +82,7 @@ Example: sound { compatible = "axentia,tse850-pcm5142"; axentia,ssc-controller = <&ssc0>; axentia,cpu-dai = <&ssc0>; axentia,audio-codec = <&codec>; axentia,add-gpios = <&pioA 8 GPIO_ACTIVE_LOW>; Loading drivers/misc/atmel-ssc.c +50 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ #include <linux/of.h> #include "../../sound/soc/atmel/atmel_ssc_dai.h" /* Serialize access to ssc_list and user count */ static DEFINE_SPINLOCK(user_lock); static LIST_HEAD(ssc_list); Loading Loading @@ -145,6 +147,49 @@ static inline const struct atmel_ssc_platform_data * __init platform_get_device_id(pdev)->driver_data; } #ifdef CONFIG_SND_ATMEL_SOC_SSC static int ssc_sound_dai_probe(struct ssc_device *ssc) { struct device_node *np = ssc->pdev->dev.of_node; int ret; int id; ssc->sound_dai = false; if (!of_property_read_bool(np, "#sound-dai-cells")) return 0; id = of_alias_get_id(np, "ssc"); if (id < 0) return id; ret = atmel_ssc_set_audio(id); ssc->sound_dai = !ret; return ret; } static void ssc_sound_dai_remove(struct ssc_device *ssc) { if (!ssc->sound_dai) return; atmel_ssc_put_audio(of_alias_get_id(ssc->pdev->dev.of_node, "ssc")); } #else static inline int ssc_sound_dai_probe(struct ssc_device *ssc) { if (of_property_read_bool(ssc->pdev->dev.of_node, "#sound-dai-cells")) return -ENOTSUPP; return 0; } static inline void ssc_sound_dai_remove(struct ssc_device *ssc) { } #endif static int ssc_probe(struct platform_device *pdev) { struct resource *regs; Loading Loading @@ -204,6 +249,9 @@ static int ssc_probe(struct platform_device *pdev) dev_info(&pdev->dev, "Atmel SSC device at 0x%p (irq %d)\n", ssc->regs, ssc->irq); if (ssc_sound_dai_probe(ssc)) dev_err(&pdev->dev, "failed to auto-setup ssc for audio\n"); return 0; } Loading @@ -211,6 +259,8 @@ static int ssc_remove(struct platform_device *pdev) { struct ssc_device *ssc = platform_get_drvdata(pdev); ssc_sound_dai_remove(ssc); spin_lock(&user_lock); list_del(&ssc->list); spin_unlock(&user_lock); Loading include/drm/drm_edid.h +13 −0 Original line number Diff line number Diff line Loading @@ -248,6 +248,7 @@ struct detailed_timing { # define DRM_ELD_AUD_SYNCH_DELAY_MAX 0xfa /* 500 ms */ #define DRM_ELD_SPEAKER 7 # define DRM_ELD_SPEAKER_MASK 0x7f # define DRM_ELD_SPEAKER_RLRC (1 << 6) # define DRM_ELD_SPEAKER_FLRC (1 << 5) # define DRM_ELD_SPEAKER_RC (1 << 4) Loading Loading @@ -413,6 +414,18 @@ static inline int drm_eld_size(const uint8_t *eld) return DRM_ELD_HEADER_BLOCK_SIZE + eld[DRM_ELD_BASELINE_ELD_LEN] * 4; } /** * drm_eld_get_spk_alloc - Get speaker allocation * @eld: pointer to an ELD memory structure * * The returned value is the speakers mask. User has to use %DRM_ELD_SPEAKER * field definitions to identify speakers. */ static inline u8 drm_eld_get_spk_alloc(const uint8_t *eld) { return eld[DRM_ELD_SPEAKER] & DRM_ELD_SPEAKER_MASK; } /** * drm_eld_get_conn_type - Get device type hdmi/dp connected * @eld: pointer to an ELD memory structure Loading include/linux/atmel-ssc.h +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ struct ssc_device { int user; int irq; bool clk_from_rk_pin; bool sound_dai; }; struct ssc_device * __must_check ssc_request(unsigned int ssc_num); Loading Loading
Documentation/devicetree/bindings/misc/atmel-ssc.txt +2 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ Optional properties: this parameter to choose where the clock from. - By default the clock is from TK pin, if the clock from RK pin, this property is needed. - #sound-dai-cells: Should contain <0>. - This property makes the SSC into an automatically registered DAI. Examples: - PDC transfer: Loading
Documentation/devicetree/bindings/sound/axentia,tse850-pcm5142.txt +8 −3 Original line number Diff line number Diff line Loading @@ -2,8 +2,7 @@ Devicetree bindings for the Axentia TSE-850 audio complex Required properties: - compatible: "axentia,tse850-pcm5142" - axentia,ssc-controller: The phandle of the atmel SSC controller used as cpu dai. - axentia,cpu-dai: The phandle of the cpu dai. - axentia,audio-codec: The phandle of the PCM5142 codec. - axentia,add-gpios: gpio specifier that controls the mixer. - axentia,loop1-gpios: gpio specifier that controls loop relays on channel 1. Loading Loading @@ -43,6 +42,12 @@ the PCM5142 codec. Example: &ssc0 { #sound-dai-cells = <0>; status = "okay"; }; &i2c { codec: pcm5142@4c { compatible = "ti,pcm5142"; Loading Loading @@ -77,7 +82,7 @@ Example: sound { compatible = "axentia,tse850-pcm5142"; axentia,ssc-controller = <&ssc0>; axentia,cpu-dai = <&ssc0>; axentia,audio-codec = <&codec>; axentia,add-gpios = <&pioA 8 GPIO_ACTIVE_LOW>; Loading
drivers/misc/atmel-ssc.c +50 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ #include <linux/of.h> #include "../../sound/soc/atmel/atmel_ssc_dai.h" /* Serialize access to ssc_list and user count */ static DEFINE_SPINLOCK(user_lock); static LIST_HEAD(ssc_list); Loading Loading @@ -145,6 +147,49 @@ static inline const struct atmel_ssc_platform_data * __init platform_get_device_id(pdev)->driver_data; } #ifdef CONFIG_SND_ATMEL_SOC_SSC static int ssc_sound_dai_probe(struct ssc_device *ssc) { struct device_node *np = ssc->pdev->dev.of_node; int ret; int id; ssc->sound_dai = false; if (!of_property_read_bool(np, "#sound-dai-cells")) return 0; id = of_alias_get_id(np, "ssc"); if (id < 0) return id; ret = atmel_ssc_set_audio(id); ssc->sound_dai = !ret; return ret; } static void ssc_sound_dai_remove(struct ssc_device *ssc) { if (!ssc->sound_dai) return; atmel_ssc_put_audio(of_alias_get_id(ssc->pdev->dev.of_node, "ssc")); } #else static inline int ssc_sound_dai_probe(struct ssc_device *ssc) { if (of_property_read_bool(ssc->pdev->dev.of_node, "#sound-dai-cells")) return -ENOTSUPP; return 0; } static inline void ssc_sound_dai_remove(struct ssc_device *ssc) { } #endif static int ssc_probe(struct platform_device *pdev) { struct resource *regs; Loading Loading @@ -204,6 +249,9 @@ static int ssc_probe(struct platform_device *pdev) dev_info(&pdev->dev, "Atmel SSC device at 0x%p (irq %d)\n", ssc->regs, ssc->irq); if (ssc_sound_dai_probe(ssc)) dev_err(&pdev->dev, "failed to auto-setup ssc for audio\n"); return 0; } Loading @@ -211,6 +259,8 @@ static int ssc_remove(struct platform_device *pdev) { struct ssc_device *ssc = platform_get_drvdata(pdev); ssc_sound_dai_remove(ssc); spin_lock(&user_lock); list_del(&ssc->list); spin_unlock(&user_lock); Loading
include/drm/drm_edid.h +13 −0 Original line number Diff line number Diff line Loading @@ -248,6 +248,7 @@ struct detailed_timing { # define DRM_ELD_AUD_SYNCH_DELAY_MAX 0xfa /* 500 ms */ #define DRM_ELD_SPEAKER 7 # define DRM_ELD_SPEAKER_MASK 0x7f # define DRM_ELD_SPEAKER_RLRC (1 << 6) # define DRM_ELD_SPEAKER_FLRC (1 << 5) # define DRM_ELD_SPEAKER_RC (1 << 4) Loading Loading @@ -413,6 +414,18 @@ static inline int drm_eld_size(const uint8_t *eld) return DRM_ELD_HEADER_BLOCK_SIZE + eld[DRM_ELD_BASELINE_ELD_LEN] * 4; } /** * drm_eld_get_spk_alloc - Get speaker allocation * @eld: pointer to an ELD memory structure * * The returned value is the speakers mask. User has to use %DRM_ELD_SPEAKER * field definitions to identify speakers. */ static inline u8 drm_eld_get_spk_alloc(const uint8_t *eld) { return eld[DRM_ELD_SPEAKER] & DRM_ELD_SPEAKER_MASK; } /** * drm_eld_get_conn_type - Get device type hdmi/dp connected * @eld: pointer to an ELD memory structure Loading
include/linux/atmel-ssc.h +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ struct ssc_device { int user; int irq; bool clk_from_rk_pin; bool sound_dai; }; struct ssc_device * __must_check ssc_request(unsigned int ssc_num); Loading