summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel
AgeCommit message (Collapse)AuthorFilesLines
2018-10-05ASoC: intel: skylake: Add fall-through annotationTakashi Iwai1-0/+1
As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, add the "fall through" annotation in Intel SST skylake driver. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-10-04ASoC: intel: skylake: Add missing break in skl_tplg_get_token()Takashi Iwai1-0/+1
skl_tplg_get_token() misses a break in the big switch() block for SKL_TKN_U8_CORE_ID entry. Spotted nicely by -Wimplicit-fallthrough compiler option. Fixes: 6277e83292a2 ("ASoC: Intel: Skylake: Parse vendor tokens to build module data") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-20ASoC: add for_each_card_components() macroKuninori Morimoto4-8/+8
To be more readable code, this patch adds new for_each_card_components() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-20ASoC: add for_each_card_rtds() macroKuninori Morimoto1-2/+2
To be more readable code, this patch adds new for_each_card_rtds() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-20ASoC: add for_each_card_prelinks() macroKuninori Morimoto1-2/+3
To be more readable code, this patch adds new for_each_card_prelinks() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-18Merge branch 'asoc-4.19' into asoc-4.20 for rt5682 deps.Mark Brown1-7/+5
2018-09-12sound: don't call skl_init_chip() to reset intel skl socYu Zhao1-1/+1
Internally, skl_init_chip() calls snd_hdac_bus_init_chip() which 1) sets bus->chip_init to prevent multiple entrances before device is stopped; 2) enables interrupt. We shouldn't use it for the purpose of resetting device only because 1) when we really want to initialize device, we won't be able to do so; 2) we are ready to handle interrupt yet, and kernel crashes when interrupt comes in. Rename azx_reset() to snd_hdac_bus_reset_link(), and use it to reset device properly. Fixes: 60767abcea3d ("ASoC: Intel: Skylake: Reset the controller in probe") Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Yu Zhao <yuzhao@google.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-12Revert "ASoC: Intel: Skylake: Acquire irq after RIRB allocation"Yu Zhao1-6/+4
This reverts commit 12eeeb4f4733bbc4481d01df35933fc15beb8b19. The patch doesn't fix accessing memory with null pointer in skl_interrupt(). There are two problems: 1) skl_init_chip() is called twice, before and after dma buffer is allocate. The first call sets bus->chip_init which prevents the second from initializing bus->corb.buf and rirb.buf from bus->rb.area. 2) snd_hdac_bus_init_chip() enables interrupt before snd_hdac_bus_init_cmd_io() initializing dma buffers. There is a small window which skl_interrupt() can be called if irq has been acquired. If so, it crashes when using null dma buffer pointers. Will fix the problems in the following patches. Also attaching the crash for future reference. [ 16.949148] general protection fault: 0000 [#1] PREEMPT SMP KASAN PTI <snipped> [ 16.950903] Call Trace: [ 16.950906] <IRQ> [ 16.950918] skl_interrupt+0x19e/0x2d6 [snd_soc_skl] [ 16.950926] ? dma_supported+0xb5/0xb5 [snd_soc_skl] [ 16.950933] __handle_irq_event_percpu+0x27a/0x6c8 [ 16.950937] ? __irq_wake_thread+0x1d1/0x1d1 [ 16.950942] ? __do_softirq+0x57a/0x69e [ 16.950944] handle_irq_event_percpu+0x95/0x1ba [ 16.950948] ? _raw_spin_unlock+0x65/0xdc [ 16.950951] ? __handle_irq_event_percpu+0x6c8/0x6c8 [ 16.950953] ? _raw_spin_unlock+0x65/0xdc [ 16.950957] ? time_cpufreq_notifier+0x483/0x483 [ 16.950959] handle_irq_event+0x89/0x123 [ 16.950962] handle_fasteoi_irq+0x16f/0x425 [ 16.950965] handle_irq+0x1fe/0x28e [ 16.950969] do_IRQ+0x6e/0x12e [ 16.950972] common_interrupt+0x7a/0x7a [ 16.950974] </IRQ> <snipped> [ 16.951031] RIP: snd_hdac_bus_update_rirb+0x19b/0x4cf [snd_hda_core] RSP: ffff88015c807c08 [ 16.951036] ---[ end trace 58bf9ece1775bc92 ]--- Fixes: 2eeeb4f4733b ("ASoC: Intel: Skylake: Acquire irq after RIRB allocation") Signed-off-by: Yu Zhao <yuzhao@google.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-10ASoC: skl-topology: Use kmemdup to replace kzalloc + memcpyzhong jiang1-2/+1
kmemdup has implemented the function that kzalloc() + memcpy() will do. and we prefer to kmemdup rather than the open coded implementation. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-04ASoC: add for_each_rtd_codec_dai() macroKuninori Morimoto2-6/+4
ALSA SoC snd_soc_pcm_runtime has snd_soc_dai array for codec_dai. To be more readable code, this patch adds new for_each_rtd_codec_dai() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: Intel: cht-bsw-rt5672: Add key-mappings for the headset buttonsHans de Goede1-0/+5
Having the headset buttons send BTN_0, BTN_1 and BTN_2 events is not really useful. Add mappings to PLAYPAUSE VOLUME_UP and VOLUME_DOWN like we do in other Intel machine drivers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: Intel: common: Add quirk for Thinkpad 8 tabletHans de Goede1-0/+7
The Thinkpad 8 tablet uses 10EC5640 as ACPI HID, but it has a rt5670 codec add a quirk for this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: hdac_hda: add asoc extension for legacy HDA codec driversRakesh Ughreja5-5/+107
This patch adds a kernel module which is used by the legacy HDA codec drivers as library. This implements hdac_ext_bus_ops to enable the reuse of legacy HDA codec drivers with ASoC platform drivers. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: Intel: Skylake: use hda_bus instead of hdac_busRakesh Ughreja2-5/+16
Use hda_bus instead of hdac_bus in the SKL ASoC platform driver to enable reuse of legacy HDA codec drivers. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: Intel: Skylake: add HDA BE DAIsRakesh Ughreja1-12/+58
Add support for HDA BE DAIs in SKL platform driver. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: Intel: Skylake: use HDAudio if ACPI enumeration failsRakesh Ughreja1-5/+33
When no I2S based codec entries are found in the BIOS, check if there are any HDA codecs detected on the bus. Based on the number of codecs found take appropriate action in machine driver. If there are two HDA codecs i.e. iDisp + HDA found on the bus, register DAIs and DAI links for both. If only one codec i.e. iDisp is found then load only iDisp machine driver. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: Intel: Boards: Machine driver for SKL+ w/ HDAudio codecsRakesh Ughreja6-0/+297
Add machine driver for Intel platforms (SKL/KBL/BXT/APL) with HDA and iDisp codecs. This patch adds support for only iDisp (HDMI/DP) codec. In the following patches support for HDA codecs will be added. This should work for other Intel platforms as well e.g. GLK,CNL however this series is not tested on all the platforms. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: Intel: common: add table for HDA-based platformsPierre-Louis Bossart2-1/+42
Expose a table containing machine driver information for HDAudio-based platforms handled by ASoC on Intel hardware. We only set constant values that are valid across multiple platforms. The firmware name used by the DSP will be set dynamically for each platform. The table is made of a single entry for now, if we need more complicated set-up where HDAudio is mixed with ACPI-enumerated devices (I2C, SoundWire) then we'd expect the differentiation to be handled through information provided by the BIOS (as done for KBL Chromebooks). Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28Merge tag 'v4.19-rc1' into asoc-4.19Mark Brown1-2/+2
Linux 4.19-rc1
2018-08-23treewide: correct "differenciate" and "instanciate" typosFinn Thain1-2/+2
Also add these typos to spelling.txt so checkpatch.pl will look for them. Link: http://lkml.kernel.org/r/88af06b9de34d870cb0afc46cfd24e0458be2575.1529471371.git.fthain@telegraphics.com.au Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-08-14ASoC: Intel: Skylake: Acquire irq after RIRB allocationYong Zhi1-4/+6
Cold reboot stress test found that the hda irq could access rirb ring buffer before its memory gets allocated which resulting in null pointer dereference inside snd_hdac_bus_update_rirb(). Fix it by moving the skl_acquire_irq after ring buffer allocation. While here, also change err return from -EBUSY to actual error code. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-14ASoC: Intel: bytcr_rt5640: Add quirks for 2 more devicesHans de Goede1-0/+26
Add quirks to select the right input-map, jack-detect pin, etc. for: Linx Linx7 tablet Onda V975w tablet Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-03ASoC: Intel: bxt: Use refcap device for mono recordingYong Zhi1-0/+14
The refcap capture device supports mono recording only, this patch adds the channel constraints. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-01Merge branch 'topic/drm_audio_component' of ↵Mark Brown7-211/+182
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-4.19
2018-07-26ASoC: intel: Fix snd_pcm_format_t handlingTakashi Iwai9-13/+11
As sparse warns, the PCM format type can't be dealt as integer as found in Intel SST driver codes. Fix them in the following two ways: - The open code with snd_mask_set() and params->masks reference is replaced with params_set_format() - The rest codes with snd_mask_set(fmt, SNDRV_PCM_FORMAT_XXX) are replaced with the new helper, snd_mask_set_format(). Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-25ASoC: Intel: Skylake: fix widget handlingRakesh Ughreja1-0/+3
include DAPM Mux and output widgets into the list. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-25ASoC: Intel: Atom: fix inversion between __iowrite32 and __ioread32Pierre-Louis Bossart1-3/+3
This looks like a copy/paste issue, but clearly there is an inversion that is obvious when checking the arguments. Detected with Sparse - now that we have fewer warnings this one was easy to find. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-25ASoC: Intel: Atom: simplify iomem address and castsPierre-Louis Bossart1-14/+15
Simplify code and add relevant casts to make Sparse warnings go away Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-25ASoC: Intel: common: make sst_dma functions staticPierre-Louis Bossart1-4/+2
sst_dma_new and sst_dma_free are not used in any other file and don't have a prototype. Move to static functions and remove EXPORT_SYMBOL_GPL statement. Reported by sparse warnings. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-25ASoC: Intel: Skylake: BDL definitions should be __le32Pierre-Louis Bossart2-5/+5
Make sure definitions are consistent with usage. Detected with Sparse. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-25ASoC: Intel: Haswell: fix endianness handlingPierre-Louis Bossart1-24/+29
Make all Sparse warnings go away by using le16/32_to_cpu. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-19ASoC: Intel: bytcr_rt5640: Add quirk for the "Connect Tablet 9" tabletHans de Goede1-0/+10
Add a quirk for the "Connect Tablet 9" tablet, this tablet has a mono-speaker. Otherwise it works fine with the defaults. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-19ASoC: Intel: bytcr_rt5651: Add quirk table entries for various devicesHans de Goede1-0/+28
Add quirk table entries for the following tablets: ITWorks TW701 Ployer Momo7w Trekstor win7 Yours 8" These all use the default settings, except that they only have a single speaker and thus need the mono-speaker quirk. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-19ASoC: Intel: bytcr_rt5651: Add mono speaker quirkHans de Goede1-4/+11
During my initial round of bytcr_rt5651 long-name patches I did not include a difference for mono vs stereo speaker setups in the longname because it seems that all 5651 devices with only a single speaker do some mixing of left + right on the PCB. However further testing has shown that while this works great when only playing audio on the left or right channel, the output becomes garbled when using both channels at once. Something which does not happen when using the Stereo DAC MIXL / MIXR switches to mix the channels together inside the codec and then only outputting on a single channel. So we need to have separate UCM profiles and thus separate long-names for devices with a mono speaker vs stereo speakers. Just as we already have for the bytcr_rt5640 case. This commit adds a new BYT_RT5651_MONO_SPEAKER quirk and adds "stereo-spk" or "mono-spk" to the long-name based on this and enables this mapping on devices with a mono speaker. Changing the long-name like this is ok for now, since I'm still working on the UCM profiles, so they are not in upstream alsa-lib yet. This brings the long-name naming scheme fully in sync with the bytcr_rt5640 case, which is good from a consistency pov. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-19ASoC: Intel: bytcr_rt5651: Add IN2 input mappingHans de Goede1-5/+18
During the recent cleanup series 3 of the 6 input mappings where removed from the bytcr_rt5651 machine driver because testing showed that none of them were used. However some devices do actually have their internal mic on IN2 (and only IN2, not IN1 and IN2), this did not show during previous tests due to a bug in the userspace UCM input device switching code. This commit re-adds the IN2 mapping for devices with the internal mic. on IN2 and the headser mic on IN3 and enables this mapping on devices with their internal mic on IN2. This commit also changes the default internal mic input to IN2, because all my 7 test devices have their mic there. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-19ASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to 2000uAHans de Goede1-2/+5
With the default over current detect limit of 1500uA headsets on often get detected as headphones on the VIOS LTH17 and even when detected as headset the OVCD current triggers often while plugged in, resulting in false-positive button press detection. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-19ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some ↵Hans de Goede1-4/+65
boards Some boards have I2cSerialBusV2, GpioIo, GpioInt as ACPI resources, other boards may have I2cSerialBusV2, GpioInt, GpioIo instead. We want the GpioIo one for the ext-amp-enable-gpio. So far we've been assuming that the GpioIo one always comes first, this commit adds code to detect which one comes first and to add the right gpio-mapping. This fixes sound not working on the Vios LTH17 laptop. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-16ASoC: Intel: Boards: Add GLK Realtek Maxim I2S machine driverNaveen Manohar3-0/+659
Patch adds Geminilake I2S machine driver which uses following codecs: RT5682 and MAX98357A. Signed-off-by: Naveen Manohar <naveen.m@intel.com> Signed-off-by: Harsha Priya <harshapriya.n@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-10ASoC: Intel: bytcr_rt5651: Reporting button pressesHans de Goede1-2/+7
Enable reporting of button presses now that the codec driver recently has gotten support for this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-10ASoC: Intel: bytcr_rt5651: Disable jack-detect over suspend/resumeHans de Goede1-5/+44
Disable jack-detection and thus the codec IRQ over suspend/resume. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-10ASoC: Intel: bytcr_rt5651: Add support for externar amplifier enable GPIOHans de Goede1-3/+62
The rt5651 does not have a built-in speaker amplifier, so it is often used together with an external amplifier. On Cherry Trail boards this external amplifier's enable pin is driven through a GPIO, which is given as the first GPIO in the ACPI resources of the codec fwnode. This commit adds support to the bytcr_rt5651 for this GPIO, fixing the speaker not working on CHT devices with a rt5651 codec. Cc: Carlo Caione <carlo@endlessm.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-10ASoC: Intel: bytcr_rt5651: Move getting of codec_dev into probe()Hans de Goede1-12/+11
Move the getting of the codec_dev, to add device-props to it, out of byt_rt5651_add_codec_device_props() and into its caller, snd_byt_rt5651_mc_probe(). This is a preparation patch for adding support for an external amplifier enable GPIO, which requires further accesses to the codec_dev. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-10ASoC: Intel: bytcr_rt5651: Remove is_valleyview helperHans de Goede1-12/+6
Remove is_valleyview helper, this is not necessary, we can simply call x86_match_cpu() directly instead. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-10ASoC: Intel: bytcr_rt5640: Add quirk for the Lenovo Miix2 8 tabletHans de Goede1-0/+13
Add a quirk for the Lenovo Miix2 8 tablet, this tablet uses a digital mic on DMIC1 and has a mono-speaker. The jack-detect uses the default settings.. Reported-and-tested-by: russianneuromancer@ya.ru Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-28ALSA: hdac: add extended ops in the hdac_busRakesh Ughreja1-1/+1
Add extended ops in the hdac_bus to allow calling the ASoC HDAC library ops to reuse the legacy HDA codec drivers with ASoC framework. Extended ops are used by the legacy codec drivers to call into hdac_hda library, in the subsequent patches.. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-28ALSA: hdac: remove memory allocation from snd_hdac_ext_bus_device_initRakesh Ughreja1-1/+7
Remove memory allocation within snd_hdac_ext_bus_device_init, to make its behaviour identical to snd_hdac_bus_device_init. So that caller can allocate the parent data structure containing hdac_device. This API change helps in reusing the legacy HDA codec drivers with ASoC platform drivers. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-28ALSA: hdac: Remove usage of struct hdac_ext_bus and use hdac_bus insteadRakesh Ughreja7-211/+176
This patch removes the hdac_ext_bus structure. The legacy and enhanced HDaudio capabilities can be handled in a backward-compatible way without separate definitions. Follow-up patches in this series handle the driver definition. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-27ASoC: Intel: bytcr_rt5651: Sort DMI table entries alphabeticallyHans de Goede1-19/+22
As we get more entries in the DMI quirk table it is nice to have some sort of ordering in the table, sort it alphabetically. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-27ASoC: Intel: bytcr_rt5651: Add BYT_RT5651_HP_LR_SWAPPED quirkHans de Goede1-4/+23
One some models (Chuwi Vi8 Plus, Chuwi Hi8 Pro) the headphone output has left and right swapped. This can be fixed in with special mixer settings in the UCM profile, bit this requires these devices loading a different UCM profile. This commit adds a BYT_RT5651_HP_LR_SWAPPED quirk for this and postfixes the longname with "-hp-swapped" if set, so that a different UCM profile will be loaded. We can safely do this without causing regressions (UCM profile not found due to the longname change) as the UCM profiles are not in upstream alsa-lib yet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-27ASoC: Intel: bytcr_rt5651: Simplify card long-nameHans de Goede1-6/+4
Now that the headset-mic is always IN3 there is no reason to have the headset-mic mapping in the long-name. This commit simplifies the long name to "bytcr-rt5651-<intmic-map>-mic". We can safely do this without causing regressions (UCM profile not found due to the longname change) as the UCM profiles are not in upstream alsa-lib yet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>