This patch adds provision for register hdmi-audio as a alsa component
and controlled bu ALSA core.
Change-Id: Ic69a718c281f2dfdf00df273f8687cc7e0cd5428
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
(cherry picked from commit a8a603438f915ca808cd4efe40a6623dffa87e37)
Conflicts:
drivers/gpu/drm/exynos/exynos_hdmi.c
This allows the input clocks to the Exynos AudioSS block to be
specified via device-tree bindings. Default names will be used
when an input clock is not given.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
(cherry picked from commit 547f33509c)
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
The Exynos AudioSS clock controller will later be modified to allow
input clocks to be specified via device-tree in order to support
multiple Exynos SoCs. This will introduce a dependency on the core
SoC clock controller being initialized first so that the AudioSS driver
can look up its input clocks, but the order in which clock providers
are probed in of_clk_init() is not guaranteed. Since deferred probing
is not supported in of_clk_init() and the AudioSS block is not the core
controller, we can initialize it later as a platform device.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Acked-by: Tomasz Figa <t.figa@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
(cherry picked from commit b37a422410)
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
(adapted from Sachin Kamat's patch)
Almost all Exynos-series of SoCs that run in secure mode don't need
additional offset for every CPU, with Exynos4412 being the only
exception.
(cherry picked from commit 10ba1ec8b021fda08d0342e19d86c1f319b0366d)
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
ODROID-XU: added the soundcard to the odroidxu DTS file.
(cherry picked from commit 986a107a2757e86b475d0a20d7c72cca3a627a5e)
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
Export the snd_soc_jack_gpio_detect function. Allow it to be called to
poll a gpio jack during resume, checking for state changes that may have
been missed while sleeping.
BUG=chrome-os-partner:14417
TEST=Plug headphones, play audio, suspend, unplug, resume, check audio
comes from speakers.
Change-Id: I3c2abf1c69abca6178bde1391b323efa0a6c507d
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/34047
Reviewed-by: Olof Johansson <olofj@chromium.org>
Conflicts:
include/sound/soc.h
hdmi_reg_infoframe called from hdmi_conf_init unconditionally enables
sending AUI infoframe on every vsync. This register is also controlled
from hdmi_audio_control which is supposed to control HDMI audio.
Setting it from hdmi_reg_infoframe overrides hdmi_audio_control causing
HDMI audio to be always enabled, even on DVI monitors, which causes some
of them to blank when audio is playing in Chrome OS. This change removes
the unconditional setting of HDMI AUI transmit from hdmi_reg_infoframe
so hdmi_audio_control is really in control.
As a bonus, it also adds use of defines instead of literals for HDMI AUI
enable/disable in hdmi_audio_control.
BUG=chromium:331938
TEST=connect DVI monitor and play sound, it should not blank
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Change-Id: Ibb299597e57b294beb57299bc132786f7f9af7a7
Reviewed-on: https://chromium-review.googlesource.com/181967
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Dominik Behr <dbehr@chromium.org>
Tested-by: Dominik Behr <dbehr@chromium.org>
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
(cherry picked from commit 1a61b17edc591945b847e925e74834e428235035)
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
HDMI audio driver does not provide PM callbacks to
handle S2R scenarios. Due to this audio doesn't
resume after S2R as hdmi-audio related registers get
reset.
While suspending, hdmi hotplug variable is set to
unplugged state to ensure that no dapm callback
access the registers. Resume callback checks the status
of the HPD gpio line and trigger the hotplug handler.
This ensures that registers are back to the pre-S2R state.
This is equivalent to call hdmi_commit for drm hdmi
driver in resume callback.
BUG=chrome-os-partner:24068
TEST=System works fine on Peach board. Tested S2R when hdmi
is connected along with audio playback.
Change-Id: I79fdaf2565b6074ca922d56ef081cfa4d74c9d77
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/178483
Reviewed-by: shirish s <s.shirish@samsung.com>
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
(cherry picked from commit 1981a3eb137d33ed33b3bbecffebf10b3fd0b872)
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
exynos-hdmi-audio used to configure HDMI to send ACR and AUI infoframes
even when DVI sink was plugged using HDMI-DVI cable.
This would cause monitor to go to sleep.
So, don't configure audio if HDMI is in DVI mode,
assuming the graphics driver already disabled it.
Also, if HDMI audio jack hotplugging was previously reported,
report that it was unplugged when DVI mode is detected.
BUG=chromium:222145,chromium:239641
TEST=Various HDMI/DVI plug/unplug scenarios, the most complex being:
play music, plug HDMI, suspend, unplug HDMI, plug DVI, resume,
listen to sound on internal speakers.
Signed-off-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50726
Reviewed-by: Dylan Reid <dgreid@chromium.org>
(cherry picked from commit 1819d3da10dd1ee0c398a98e36d5ea0625855d3b)
(cherry picked from commit c17dd45a794c63db0b66faa2e3eddff3104cd6d0)
Change-Id: I7ff4f4c5c55de9dbed58a46dd103007762314d24
Reviewed-on: https://chromium-review.googlesource.com/174263
Commit-Queue: Chih-Chung Chang <chihchung@chromium.org>
Tested-by: Chih-Chung Chang <chihchung@chromium.org>
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
(cherry picked from commit b44fc97317e093c4a43746847884b31bb1ea9d88)
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
The hdmi_audio plugin callbacks change the HDMI audio state even if
those requests are not for playback (like recording). This inadvertently
makes stopping recording turn off HDMI audio playback. Now we ignore
those requests.
BUG=chrome-os-partner:22492
TEST=On daisy, while playing a wav file, start and stop recording. The
playback should not be affected.
Change-Id: I879732206b2c1e67730694d65fd77e5062d2af5b
Signed-off-by: Chih-Chung Chang <chihchung@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/169515
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
(cherry picked from commit 25716b457ad56f5369cc4b0ec2fb906ab63e54fa)
Reviewed-on: https://chromium-review.googlesource.com/173363
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
(cherry picked from commit 66ecdbf0ee143a7fd6f7d6c733795ebf73baf446)
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
HDMI audio driver needs to configure the hdmi registers only after
phy is in stable state. Previously, register configuration is delayed
until HDMI driver has resumed from suspended state. But now HDMI
driver is not registering Runtime PM callbacks. Secondly due to
de-bounce logic added in hdmi driver for hotplug, it takes more time
for Phy to get stable.
This patch replaces the condition with a check for PHY stable state
before setting the audio configuration.
BUG=chrome-os-partner:22200
TEST=System works fine on Peach board along with S2R. Played audio and
then plugged hdmi cable. Audio is heard from hdmi display.
Change-Id: I7aecc841207dc3bf42c4968c0d7df7e073bedae2
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/169743
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
(cherry picked from commit e0776057d4979f5ce8260aaad091cc852fb49405)
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
While hdmi cable is upplugged, stop checking the runtime power
state of hdmi ip. During unplug, hdmi-audio driver doesn't access
the registers.
It is only meaningful when cable is plugged and hdmi audio registers
need to be updated with playing audio parameters.
BUG=chrome-os-partner:20249
TEST=basic hdmi works fine on Snow, Peach board.
Change-Id: I0d9920523f4cb096c1a72e64f3b904f0ac8d1209
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/58870
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>
(cherry picked from commit 0e3c8fcf59126f7dd9709cdd023edefba06f0aa7)
Signed-off-by: Humberto Silva Naves <hsnaves@gmail.com>