]> Git Repo - linux.git/commitdiff
Merge tag 'asoc-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
authorTakashi Iwai <[email protected]>
Mon, 13 Nov 2017 14:45:57 +0000 (15:45 +0100)
committerTakashi Iwai <[email protected]>
Mon, 13 Nov 2017 14:45:57 +0000 (15:45 +0100)
ASoC: Updates for v4.15

The biggest thing this release has been the conversion of the AC98 bus
to the driver model, that's been a long time coming so thanks to Robert
Jarzmik for his dedication there.  Due to there being some AC97 MFD
there's a few fairly large changes in input and the MFD layer, mainly to
the wm97xx driver.

There's also some drivers/drm changes to support the new AMD Stoney
platform, these are shared with the DRM subsystem and should be being
merged via both.

Within the subsystem the overwhelming bulk of the changes is in the
Intel drivers which continue to need lots of cleanups and fixes, this
release they've also gained support for their open source firmware.
There's also some large changs in the core as Morimoto-san continues to
mirror operations into the component level in preparation for conversion
of drivers to that.

 - The AC97 bus has finally caught up with the driver model thanks to
   some dedicated and persistent work from Robert Jarzmik.
 - Continued work from Morimoto-san on moving us towards being able to
   use components for everything.
 - Lots of cleanups for the Intel platform code, including support for
   their open source audio firmware.
 - Support for scaling MCLK with sample rate in simple-card.
 - Support for AMD Stoney platform.

1  2 
MAINTAINERS
include/linux/usb.h
include/sound/hdaudio.h
include/sound/snd_wavefront.h
sound/Kconfig
sound/Makefile
sound/hda/hdac_sysfs.c
sound/hda/local.h
sound/pci/oxygen/xonar_dg.h
sound/soc/codecs/rt5645.c

diff --combined MAINTAINERS
index cba2b4213492ba6b1cd6970d7a399c41163e43bb,761aa3c063601f0e427dfd7b472fb5c132f60fa0..cb3a9f570a5d332675b757762d35bc9d332ec51c
@@@ -527,6 -527,11 +527,6 @@@ W:        http://ez.analog.com/community/linux
  S:    Supported
  F:    drivers/input/misc/adxl34x.c
  
 -AEDSP16 DRIVER
 -M:    Riccardo Facchetti <[email protected]>
 -S:    Maintained
 -F:    sound/oss/aedsp16.c
 -
  AF9013 MEDIA DRIVER
  M:    Antti Palosaari <[email protected]>
  L:    [email protected]
@@@ -868,7 -873,7 +868,7 @@@ F: drivers/android
  F:    drivers/staging/android/
  
  ANDROID GOLDFISH RTC DRIVER
- M:    Miodrag Dinic <miodrag.dinic@imgtec.com>
+ M:    Miodrag Dinic <miodrag.dinic@mips.com>
  S:    Supported
  F:    Documentation/devicetree/bindings/rtc/google,goldfish-rtc.txt
  F:    drivers/rtc/rtc-goldfish.c
@@@ -6666,7 -6671,7 +6666,7 @@@ F:      include/net/ieee802154_netdev.
  F:    Documentation/networking/ieee802154.txt
  
  IFE PROTOCOL
- M:    Yotam Gigi <yotamg@mellanox.com>
+ M:    Yotam Gigi <yotam.gi@gmail.com>
  M:    Jamal Hadi Salim <[email protected]>
  F:    net/ife
  F:    include/net/ife.h
@@@ -6728,7 -6733,7 +6728,7 @@@ S:      Maintaine
  F:    drivers/usb/atm/ueagle-atm.c
  
  IMGTEC ASCII LCD DRIVER
- M:    Paul Burton <paul.burton@imgtec.com>
+ M:    Paul Burton <paul.burton@mips.com>
  S:    Maintained
  F:    Documentation/devicetree/bindings/auxdisplay/img-ascii-lcd.txt
  F:    drivers/auxdisplay/img-ascii-lcd.c
@@@ -8738,7 -8743,7 +8738,7 @@@ Q:      http://patchwork.ozlabs.org/project/
  F:    drivers/net/ethernet/mellanox/mlxsw/
  
  MELLANOX FIRMWARE FLASH LIBRARY (mlxfw)
- M:    Yotam Gigi <[email protected]>
+ M:    [email protected]
  L:    [email protected]
  S:    Supported
  W:    http://www.mellanox.com
@@@ -8988,7 -8993,7 +8988,7 @@@ F:      Documentation/mips
  F:    arch/mips/
  
  MIPS BOSTON DEVELOPMENT BOARD
- M:    Paul Burton <paul.burton@imgtec.com>
+ M:    Paul Burton <paul.burton@mips.com>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/clock/img,boston-clock.txt
@@@ -8998,7 -9003,7 +8998,7 @@@ F:      drivers/clk/imgtec/clk-boston.
  F:    include/dt-bindings/clock/boston-clock.h
  
  MIPS GENERIC PLATFORM
- M:    Paul Burton <paul.burton@imgtec.com>
+ M:    Paul Burton <paul.burton@mips.com>
  L:    [email protected]
  S:    Supported
  F:    arch/mips/generic/
@@@ -9014,7 -9019,7 +9014,7 @@@ F:      drivers/*/*loongson1
  F:    drivers/*/*/*loongson1*
  
  MIPS RINT INSTRUCTION EMULATION
- M:    Aleksandar Markovic <aleksandar.markovic@imgtec.com>
+ M:    Aleksandar Markovic <aleksandar.markovic@mips.com>
  L:    [email protected]
  S:    Supported
  F:    arch/mips/math-emu/sp_rint.c
@@@ -9194,6 -9199,12 +9194,6 @@@ F:     include/linux/dt-bindings/mux
  F:    include/linux/mux/
  F:    drivers/mux/
  
 -MULTISOUND SOUND DRIVER
 -M:    Andrew Veliath <[email protected]>
 -S:    Maintained
 -F:    Documentation/sound/oss/MultiSound
 -F:    sound/oss/msnd*
 -
  MULTITECH MULTIPORT CARD (ISICOM)
  S:    Orphan
  F:    drivers/tty/isicom.c
@@@ -10672,10 -10683,9 +10672,9 @@@ S:  Maintaine
  F:    drivers/pinctrl/spear/
  
  PISTACHIO SOC SUPPORT
- M:    James Hartley <[email protected]>
- M:    Ionela Voinescu <[email protected]>
+ M:    James Hartley <[email protected]>
  L:    [email protected]
- S:    Maintained
+ S:    Odd Fixes
  F:    arch/mips/pistachio/
  F:    arch/mips/include/asm/mach-pistachio/
  F:    arch/mips/boot/dts/img/pistachio*
@@@ -10879,7 -10889,7 +10878,7 @@@ S:   Maintaine
  F:    drivers/block/ps3vram.c
  
  PSAMPLE PACKET SAMPLING SUPPORT:
- M:    Yotam Gigi <yotamg@mellanox.com>
+ M:    Yotam Gigi <yotam.gi@gmail.com>
  S:    Maintained
  F:    net/psample
  F:    include/net/psample.h
@@@ -14587,6 -14597,7 +14586,7 @@@ F:   Documentation/devicetree/bindings/ex
  F:    Documentation/devicetree/bindings/regulator/arizona-regulator.txt
  F:    Documentation/devicetree/bindings/mfd/arizona.txt
  F:    Documentation/devicetree/bindings/mfd/wm831x.txt
+ F:    Documentation/devicetree/bindings/sound/wlf,arizona.txt
  F:    arch/arm/mach-s3c64xx/mach-crag6410*
  F:    drivers/clk/clk-wm83*.c
  F:    drivers/extcon/extcon-arizona.c
diff --combined include/linux/usb.h
index 2b861804fffac0c4ac71ad57d90750e7cecac7ae,9c63792a8134f756a66b70eafd48af34a1831f58..4192a1755ccbaf18e31836db654804f039b61f25
@@@ -1,3 -1,4 +1,4 @@@
+ /* SPDX-License-Identifier: GPL-2.0 */
  #ifndef __LINUX_USB_H
  #define __LINUX_USB_H
  
@@@ -1728,8 -1729,6 +1729,8 @@@ static inline int usb_urb_dir_out(struc
        return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_OUT;
  }
  
 +int usb_urb_ep_type_check(const struct urb *urb);
 +
  void *usb_alloc_coherent(struct usb_device *dev, size_t size,
        gfp_t mem_flags, dma_addr_t *dma);
  void usb_free_coherent(struct usb_device *dev, size_t size,
diff --combined include/sound/hdaudio.h
index 6f1118545bb8600eb88821a7d27c17d67f64084e,d8afd8a5bd76fa6ee65c5079964c144ecf316d57..68169e3749de164c140902413dc517e18c006c53
@@@ -1,3 -1,4 +1,4 @@@
+ /* SPDX-License-Identifier: GPL-2.0 */
  /*
   * HD-audio core stuff
   */
@@@ -111,7 -112,8 +112,7 @@@ void snd_hdac_device_unregister(struct 
  int snd_hdac_device_set_chip_name(struct hdac_device *codec, const char *name);
  int snd_hdac_codec_modalias(struct hdac_device *hdac, char *buf, size_t size);
  
 -int snd_hdac_refresh_widgets(struct hdac_device *codec);
 -int snd_hdac_refresh_widget_sysfs(struct hdac_device *codec);
 +int snd_hdac_refresh_widgets(struct hdac_device *codec, bool sysfs);
  
  unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,
                               unsigned int verb, unsigned int parm);
index fcd770fdcda559c1059ace8f853b74df452c5330,6231eb57361f684f05a257d288db738f5e598330..55053557c898ef5efe13c6bd59ff25b0f5452eab
@@@ -1,3 -1,4 +1,4 @@@
+ /* SPDX-License-Identifier: GPL-2.0 */
  #ifndef __SOUND_SND_WAVEFRONT_H__
  #define __SOUND_SND_WAVEFRONT_H__
  
@@@ -28,7 -29,6 +29,7 @@@ struct _snd_wavefront_midi 
        struct snd_rawmidi_substream     *substream_output[2];
        struct snd_rawmidi_substream     *substream_input[2];
        struct timer_list        timer;
 +      snd_wavefront_card_t     *timer_card;
          spinlock_t               open;
          spinlock_t               virtual;     /* protects isvirtual */
  };
diff --combined sound/Kconfig
index b6d047985905c325503c22857eca20492d7db901,ed34218d38b80152609b5bfbc144d0be99f1215d..6833db9002ecb6bef9e588bd3dc1c1db3180d4de
@@@ -3,7 -3,25 +3,7 @@@ menuconfig SOUN
        depends on HAS_IOMEM
        help
          If you have a sound card in your computer, i.e. if it can say more
 -        than an occasional beep, say Y.  Be sure to have all the information
 -        about your sound card and its configuration down (I/O port,
 -        interrupt and DMA channel), because you will be asked for it.
 -
 -        You want to read the Sound-HOWTO, available from
 -        <http://www.tldp.org/docs.html#howto>. General information about
 -        the modular sound system is contained in the files
 -        <file:Documentation/sound/oss/Introduction>.  The file
 -        <file:Documentation/sound/oss/README.OSS> contains some slightly
 -        outdated but still useful information as well.  Newer sound
 -        driver documentation is found in <file:Documentation/sound/alsa/*>.
 -
 -        If you have a PnP sound card and you want to configure it at boot
 -        time using the ISA PnP tools (read
 -        <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
 -        compile the sound card support as a module and load that module
 -        after the PnP configuration is finished.  To do this, choose M here
 -        and read <file:Documentation/sound/oss/README.modules>; the module
 -        will be called soundcore.
 +        than an occasional beep, say Y.
  
  if SOUND
  
@@@ -62,6 -80,8 +62,8 @@@ source "sound/hda/Kconfig
  
  source "sound/ppc/Kconfig"
  
+ source "sound/ac97/Kconfig"
  source "sound/aoa/Kconfig"
  
  source "sound/arm/Kconfig"
@@@ -96,6 -116,19 +98,6 @@@ source "sound/synth/Kconfig
  
  endif # SND
  
 -menuconfig SOUND_PRIME
 -      tristate "Open Sound System (DEPRECATED)"
 -      select SOUND_OSS_CORE
 -      depends on BROKEN
 -      help
 -        Say 'Y' or 'M' to enable Open Sound System drivers.
 -
 -if SOUND_PRIME
 -
 -source "sound/oss/Kconfig"
 -
 -endif # SOUND_PRIME
 -
  endif # !UML
  
  endif # SOUND
diff --combined sound/Makefile
index e5794fdd3d79017afd6f930aaf8e78873a98ec5b,f245c75a2add973670085e1cfd85031987066e85..99d8c31262c8fc089836c15a8406551e044812bf
@@@ -1,14 -1,17 +1,16 @@@
+ # SPDX-License-Identifier: GPL-2.0
  # Makefile for the Linux sound card driver
  #
  
  obj-$(CONFIG_SOUND) += soundcore.o
 -obj-$(CONFIG_SOUND_PRIME) += oss/
 -obj-$(CONFIG_DMASOUND) += oss/
 +obj-$(CONFIG_DMASOUND) += oss/dmasound/
  obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ sh/ synth/ usb/ \
        firewire/ sparc/ spi/ parisc/ pcmcia/ mips/ soc/ atmel/ hda/ x86/
  obj-$(CONFIG_SND_AOA) += aoa/
  
  # This one must be compilable even if sound is configured out
  obj-$(CONFIG_AC97_BUS) += ac97_bus.o
+ obj-$(CONFIG_AC97_BUS_NEW) += ac97/
  
  ifeq ($(CONFIG_SND),y)
    obj-y += last.o
diff --combined sound/hda/hdac_sysfs.c
index e123ba6b2e81cbc5cf4b0c0bb252084501064f1b,3c2d45ee6ab8f8e2c7cb8d2d925052ad8474e2d0..fb2aa344981e67e65db2aaf6da0fd0af922d0c2d
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0
  /*
   * sysfs support for HD-audio core device
   */
@@@ -414,50 -415,3 +415,50 @@@ void hda_widget_sysfs_exit(struct hdac_
  {
        widget_tree_free(codec);
  }
 +
 +int hda_widget_sysfs_reinit(struct hdac_device *codec,
 +                          hda_nid_t start_nid, int num_nodes)
 +{
 +      struct hdac_widget_tree *tree;
 +      hda_nid_t end_nid = start_nid + num_nodes;
 +      hda_nid_t nid;
 +      int i;
 +
 +      if (!codec->widgets)
 +              return hda_widget_sysfs_init(codec);
 +
 +      tree = kmemdup(codec->widgets, sizeof(*tree), GFP_KERNEL);
 +      if (!tree)
 +              return -ENOMEM;
 +
 +      tree->nodes = kcalloc(num_nodes + 1, sizeof(*tree->nodes), GFP_KERNEL);
 +      if (!tree->nodes) {
 +              kfree(tree);
 +              return -ENOMEM;
 +      }
 +
 +      /* prune non-existing nodes */
 +      for (i = 0, nid = codec->start_nid; i < codec->num_nodes; i++, nid++) {
 +              if (nid < start_nid || nid >= end_nid)
 +                      free_widget_node(codec->widgets->nodes[i],
 +                                       &widget_node_group);
 +      }
 +
 +      /* add new nodes */
 +      for (i = 0, nid = start_nid; i < num_nodes; i++, nid++) {
 +              if (nid < codec->start_nid || nid >= codec->end_nid)
 +                      add_widget_node(tree->root, nid, &widget_node_group,
 +                                      &tree->nodes[i]);
 +              else
 +                      tree->nodes[i] =
 +                              codec->widgets->nodes[nid - codec->start_nid];
 +      }
 +
 +      /* replace with the new tree */
 +      kfree(codec->widgets->nodes);
 +      kfree(codec->widgets);
 +      codec->widgets = tree;
 +
 +      kobject_uevent(tree->root, KOBJ_CHANGE);
 +      return 0;
 +}
diff --combined sound/hda/local.h
index c586ea62d49ec5b8ea4d652c1d2f846a8ce705ef,7258fa8ce26829e4597834c2a51b70a1d26c5277..877631e393731c5ed4df2aa52c7c3c44342b5fe5
@@@ -1,3 -1,4 +1,4 @@@
+ /* SPDX-License-Identifier: GPL-2.0 */
  /*
   * Local helper macros and functions for HD-audio core drivers
   */
@@@ -28,8 -29,6 +29,8 @@@ static inline unsigned int get_wcaps_ch
  
  extern const struct attribute_group *hdac_dev_attr_groups[];
  int hda_widget_sysfs_init(struct hdac_device *codec);
 +int hda_widget_sysfs_reinit(struct hdac_device *codec, hda_nid_t start_nid,
 +                          int num_nodes);
  void hda_widget_sysfs_exit(struct hdac_device *codec);
  
  #endif /* __HDAC_LOCAL_H */
index 5a07cda011b3f999faaf05a3d6ca0ce6330ee16d,7a1e8f9c48e7641f3c8d28e88fb6946bf92b0c33..24d97721c2475dea661279bca077b73935b21b46
@@@ -1,3 -1,4 +1,4 @@@
+ /* SPDX-License-Identifier: GPL-2.0 */
  #ifndef XONAR_DG_H_INCLUDED
  #define XONAR_DG_H_INCLUDED
  
@@@ -51,6 -52,6 +52,6 @@@ void dg_suspend(struct oxygen *chip)
  void dg_resume(struct oxygen *chip);
  void dg_cleanup(struct oxygen *chip);
  
 -extern struct oxygen_model model_xonar_dg;
 +extern const struct oxygen_model model_xonar_dg;
  
  #endif
index 735f2d0033dd856f3d6492bd24a0d2963a92d36a,5f24df4fae8ece83f0258a022938b722e3a39dbd..f020d2d1eef4a98baa8c91442485ee64257c708e
@@@ -55,6 -55,8 +55,8 @@@ MODULE_PARM_DESC(quirk, "RT5645 pdata q
  
  #define RT5645_HWEQ_NUM 57
  
+ #define TIME_TO_POWER_MS 400
  static const struct regmap_range_cfg rt5645_ranges[] = {
        {
                .name = "PR",
@@@ -432,6 -434,7 +434,7 @@@ struct rt5645_priv 
        int jack_type;
        bool en_button_func;
        bool hp_on;
+       int v_id;
  };
  
  static int rt5645_reset(struct snd_soc_codec *codec)
@@@ -2516,9 -2519,7 +2519,7 @@@ static const struct snd_soc_dapm_route 
        { "SPKVOL L", "Switch", "SPK MIXL" },
        { "SPKVOL R", "Switch", "SPK MIXR" },
  
-       { "SPOL MIX", "DAC R1 Switch", "DAC R1" },
        { "SPOL MIX", "DAC L1 Switch", "DAC L1" },
-       { "SPOL MIX", "SPKVOL R Switch", "SPKVOL R" },
        { "SPOL MIX", "SPKVOL L Switch", "SPKVOL L" },
        { "SPOR MIX", "DAC R1 Switch", "DAC R1" },
        { "SPOR MIX", "SPKVOL R Switch", "SPKVOL R" },
@@@ -2707,6 -2708,11 +2708,11 @@@ static const struct snd_soc_dapm_route 
        { "DAC R2 Mux", "IF1 DAC", "RT5645 IF1 DAC2 R Mux" },
  };
  
+ static const struct snd_soc_dapm_route rt5645_old_dapm_routes[] = {
+       { "SPOL MIX", "DAC R1 Switch", "DAC R1" },
+       { "SPOL MIX", "SPKVOL R Switch", "SPKVOL R" },
+ };
  static int rt5645_hw_params(struct snd_pcm_substream *substream,
        struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
  {
@@@ -3340,9 -3346,9 +3346,9 @@@ static irqreturn_t rt5645_irq(int irq, 
        return IRQ_HANDLED;
  }
  
 -static void rt5645_btn_check_callback(unsigned long data)
 +static void rt5645_btn_check_callback(struct timer_list *t)
  {
 -      struct rt5645_priv *rt5645 = (struct rt5645_priv *)data;
 +      struct rt5645_priv *rt5645 = from_timer(rt5645, t, btn_check_timer);
  
        queue_delayed_work(system_power_efficient_wq,
                   &rt5645->jack_detect_work, msecs_to_jiffies(5));
@@@ -3363,6 -3369,11 +3369,11 @@@ static int rt5645_probe(struct snd_soc_
                snd_soc_dapm_add_routes(dapm,
                        rt5645_specific_dapm_routes,
                        ARRAY_SIZE(rt5645_specific_dapm_routes));
+               if (rt5645->v_id < 3) {
+                       snd_soc_dapm_add_routes(dapm,
+                               rt5645_old_dapm_routes,
+                               ARRAY_SIZE(rt5645_old_dapm_routes));
+               }
                break;
        case CODEC_TYPE_RT5650:
                snd_soc_dapm_new_controls(dapm,
@@@ -3637,14 -3648,14 +3648,14 @@@ static const struct dmi_system_id dmi_p
        {}
  };
  
- static struct rt5645_platform_data general_platform_data2 = {
+ static const struct rt5645_platform_data general_platform_data2 = {
        .dmic1_data_pin = RT5645_DMIC_DATA_IN2N,
        .dmic2_data_pin = RT5645_DMIC2_DISABLE,
        .jd_mode = 3,
        .inv_jd1_1 = true,
  };
  
- static struct dmi_system_id dmi_platform_asus_t100ha[] = {
+ static const struct dmi_system_id dmi_platform_asus_t100ha[] = {
        {
                .ident = "ASUS T100HAN",
                .matches = {
        { }
  };
  
- static struct rt5645_platform_data minix_z83_4_platform_data = {
+ static const struct rt5645_platform_data minix_z83_4_platform_data = {
        .jd_mode = 3,
  };
  
- static struct dmi_system_id dmi_platform_minix_z83_4[] = {
+ static const struct dmi_system_id dmi_platform_minix_z83_4[] = {
        {
                .ident = "MINIX Z83-4",
                .matches = {
@@@ -3775,6 -3786,12 +3786,12 @@@ static int rt5645_i2c_probe(struct i2c_
                        ret);
                return ret;
        }
+       /*
+        * Read after 400msec, as it is the interval required between
+        * read and power On.
+        */
+       msleep(TIME_TO_POWER_MS);
        regmap_read(regmap, RT5645_VENDOR_ID2, &val);
  
        switch (val) {
  
        regmap_write(rt5645->regmap, RT5645_RESET, 0);
  
+       regmap_read(regmap, RT5645_VENDOR_ID, &val);
+       rt5645->v_id = val & 0xff;
        ret = regmap_register_patch(rt5645->regmap, init_list,
                                    ARRAY_SIZE(init_list));
        if (ret != 0)
                regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2,
                        RT5645_JD_1_1_MASK, RT5645_JD_1_1_INV);
        }
 -      setup_timer(&rt5645->btn_check_timer,
 -              rt5645_btn_check_callback, (unsigned long)rt5645);
 +      timer_setup(&rt5645->btn_check_timer, rt5645_btn_check_callback, 0);
  
        INIT_DELAYED_WORK(&rt5645->jack_detect_work, rt5645_jack_detect_work);
        INIT_DELAYED_WORK(&rt5645->rcclock_work, rt5645_rcclock_work);
This page took 0.182208 seconds and 4 git commands to generate.