On 2012-10-23 18:42, Ricardo Neri wrote: >> What registers does the audio side need to access? > > It only needs access to the DMA audio data port. All other operations > that the audio driver needs are done through the omapdss audio interface. Hmm, so the audio side only needs the address of one register, for the audio data, and this address is given to sDMA? You have OMAP_HDMI_AUDIO_DMA_PORT in the audio code, is it the HDMI_WP_AUDIO_DATA register? If so, you could pass only that one address, instead of the whole HDMI register space? My point here is that we should make it very clear what the audio side can access. If we pass the whole HDMI register space, we should, in theory, be prepared to cope with the audio driver changing any register there. But if we pass only one register (or certain small ranges), we know the rest of the registers are safe. >> Why are part of the >> registers accessed via the hdmi driver API, and some directly? I imagine >> it'd be better to do either one of those, but not both. > > This is because in the current omapdss audio interface we have no > functionality to handle the DMA transfers for audio. Do you think it > would be good to explore implementing support for that? At this point it > is not clear for me how to do it without duplicating the functionality > that ASoC provides for that. No, if the common ASoC code provides functionality for this, we should at least try to use it. I was looking at the ti_hdmi_4xxx_ip.h, searching for audio related registers by searching "AUD" string. I don't know if it makes any sense (you're better to have a say on that), but I think we could pass some of the audio registers ranges to the audio driver for use. For example, the HDMI_WP_AUDIO_* registers are together, we could give those to the audio driver if it makes sense. HDMI_CORE_AV_AUD* registers are a bit scattered, but... I guess it wouldn't be difficult to pass those also, there's still only a couple separate ranges. But I also have no problem with having the hdmi audio API in the hdmi video driver, as we do now. And I think we in any case need a few functions, even if we would give the audio driver access to the AUD registers. Tomi