• Vaibhav Agarwal's avatar
    greybus: audio: Use greybus connection device for codec registration · 2a70e49f
    Vaibhav Agarwal authored
    Use GB Audio mgmt, data protocol ids to register codec module with
    GB protocol. And in response to mgmt->connection_init(), register
    GB codec driver with ASoC.
    
    Now, using msm8994  machine to register DAI link dynamically on
    codec insertion.
    
    ToDos:
    - snd_soc_register_codec() uses driver->name to identify device id.
      However, for GB device, .driver{} is not yet populated by GB core.
      Thus, defining dummy structure within codec driver. This should
      come from GB core itself.
      Even existing .driver{} may cause problem in case of multiple
      modules inserted or inserted at a different slot.
    - Fix logic for gbcodec->dais & gbcodec->dailinks. Current
      implementation contains some hard coded data with assumption of
      count=1.
    - Evaluate definition of 'gbaudio_dailink.be_id' in case of multiple
      DAI links.
    Signed-off-by: default avatarVaibhav Agarwal <vaibhav.agarwal@linaro.org>
    Signed-off-by: default avatarMark Greer <mgreer@animalcreek.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
    2a70e49f
audio_codec.c 16.7 KB