For reducing the global variable reference, keep snd_intelhad object
in the context and pass it to each helper. It's a preliminary change
for further cleanup.
This also includes the simplification of the probe procedure: the LPE
platform driver directly gets the created snd_intelhad object by
hdmi_audio_probe(), and passes it to each helper and destructor,
hdmi_audio_remove(). The hdmi_audio_probe() function doesn't call the
back-registration any longer, which is fairly useless. The LPE
platform driver initializes the stuff instead at the right place, and
calls the wq after the object creation in the probe function itself.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Yet another indirection is killed: at this time, it's
snd_intel_had_interface. It contains also the name string, but it's
nowhere used, thus we can kill it, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Like the previous patch, this replaces the indirect query_ops calls
via direct function calls. They are only get_caps and set_caps, so
fairly straightforward at this time.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now about the indirect register ops: they are replaced with direct
calls, too.
The read / write / modify ops are simply replaced with the
corresponding functions. The difference is that we calculate the
offset inside the function now. So all the had_config_offset
references in the caller side are dropped. This also simplifies the
DP-audio check in hdmi_audio_write() and hdmi_audio_rmw().
The hdmi_audio_get_register_base is dropped since it's no longer used
when the base address and config offset are referred in the read/write
functions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We have only a single implementation of had_ops, hence there is no
merit to use the indirect calls at all. Let's replace it with the
direct calls -- which allows the compiler more optimizations.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The v1 code refers to Medfield/Clovertrail. It's not used at all in
the current driver, and probably won't be ever. Let's clean this up,
then we can go to the next stage of cleanup tasks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Imported from legacy patches
Note: the new code doesn't assume a modified ELD but
an explicit notification that DP is present. It appears
that the i915 code does change the ELD so we could use
the ELD-based tests to check for DP audio
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the display resolution changes, the drm disables the
display pipes due to which audio rendering stops. At this
time, we need to ensure the existing audio pointers and
buffers are cleared out so that the playback can restarted
once the display pipe is enabled with a different N/CTS values
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jerome Anand <jerome.anand@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Hdmi audio driver based on the child platform device
created by gfx driver is implemented.
This audio driver is derived from legacy intel
hdmi audio driver.
The interfaces for interaction between gfx and audio
are updated and the driver implementation updated to
derive interrupts in its own address space based on
irq chip framework
The changes to calculate sub-period positions was triggered
by David Henningsson <david.henningsson@canonical.com> and is
accomodated in this patch
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jerome Anand <jerome.anand@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>