[alsa-devel] [PATCH v4 0/6] add IEC958 channel status control helpers

Arnaud Pouliquen arnaud.pouliquen at st.com
Tue Mar 8 13:53:55 CET 2016


V4
- Link pcm control, defined in dai, to PCM device:
	Discard solution based on  "pcm_new" ops  for DAI initialisations
        replace it by an helper function that registers pcm control and links
        it to pcm device.  
- Define helpers function to handle 'IEC958 Playback Default' control
	. add snd_pcm_iec958_ctl_new helper for compatibility with
        snd_soc_add_dai_pcm_controls implementation
        . add substream parameter for snd_pcm_create_iec958_ctl function
        . fixes based on Takashi remarks.

V3:
- Define helpers function  to handle 'IEC958 Playback Default' control
- add "pcm_new" ops  for DAI initialisations that need pcm runtime context. 
	This patchset is needed to be able to associate control to the 
        PCM device. The iec control is linked to the DAI but also to the PCM device.
        Furthermore, some platforms like sti support both HDMI and SPDIF
        outputs in parallel. Logical way to differentiate them is to link them
        to pcm device index. 

This patchset is extracted from following RFC
http://permalink.gmane.org/gmane.linux.alsa.devel/149876 (sti: add audio interface to the hdmi driver)

Notice that "ASoC: hdmi-codec: add IEC control" patch depends on integration of the hdmi-codec driver

     Patches update:
     - ALSA: pcm: add IEC958 channel status control helper
          - make mutex usage mandatory.
          - Set control index to pcm device id ( needed to be supported by iecset)
     - ASoC: core: add code to complete dai init after pcm creation
          -  fix dai param of pcm_new  ops for cpu dai.
     - ASoC: sti: use iec channel status control helper
     		new patch: implementation of the helper for sti cpu-dai 

V2:
     - patch: ALSA: pcm: add IEC958 channel status control helper
          - Return 1 instead of 0 in snd_pcm_iec958_put
          - Add .access field in control structure
          - I have kept condition on mutex for flexibility 
            (but could be cleaned to force user to use a mutex)

V1:
This RFC is the implementation of audio HDMI on sti platform based on 
generic hdmi-codec driver:
	https://patchwork.kernel.org/patch/7215271/ ("ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders")

Arnaud Pouliquen (5):
  ASoC: core: add  snd_soc_add_dai_pcm_controls helper
  ASoC: sti: use snd_soc_add_dai_pcm_controls helper
  ALSA: pcm: add IEC958 channel status control helper
  ASoC: core: allow private data for snd_soc_add_dai_pcm_controls
  ASoC: sti: use iec channel status control helper

 include/sound/hdmi-codec.h    |  1 +
 include/sound/pcm_iec958.h      |  21 +++++
 include/sound/soc-dai.h         |   1 +
 include/sound/soc.h             |   3 +
 sound/core/pcm_iec958.c         | 125 ++++++++++++++++++++++++++++++
 sound/soc/codecs/hdmi-codec.c | 54 ++++++++++++++++++++++++++++++++-----------
 sound/soc/soc-core.c            | 168 +++++++++++++++++++++++++++++++++++-----
 sound/soc/sti/Kconfig           |   1 +
 sound/soc/sti/sti_uniperif.c    |  57 +++++++-------
 sound/soc/sti/uniperif.h        |   1 +
 sound/soc/sti/uniperif_player.c |  80 +++++--------------
 11 files changed, 386 insertions(+), 126 deletions(-)

-- 
1.9.1



More information about the Alsa-devel mailing list