Commit graph

107 commits

Author SHA1 Message Date
Takashi Iwai
9eca88c881 ALSA: x86: Replace indirect query_ops with direct calls
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>
2017-02-03 17:21:41 +01:00
Takashi Iwai
f23df8071b ALSA: x86: Replace indirect register ops with direct calls
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>
2017-02-03 17:21:17 +01:00
Takashi Iwai
76296ef0ec ALSA: x86: Drop indirect calls of had_ops
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>
2017-02-03 17:20:58 +01:00
Takashi Iwai
4812dcc437 ALSA: x86: Remove v1 ops and structs
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>
2017-02-03 17:20:24 +01:00
Pierre-Louis Bossart
964ca8083c ALSA: x86: intel_hdmi: add definitions and logic for DP audio
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>
2017-02-01 16:22:24 +01:00
Jerome Anand
232892fb14 ALSA: x86: hdmi: continue playback even when display resolution changes
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>
2017-01-25 14:24:19 +01:00
Jerome Anand
5dab11d897 ALSA: x86: hdmi: Add audio support for BYT and CHT
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>
2017-01-25 14:24:08 +01:00