]> Git Repo - linux.git/commitdiff
Merge tag 'soundwire-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul...
authorLinus Torvalds <[email protected]>
Wed, 24 Jul 2024 20:04:43 +0000 (13:04 -0700)
committerLinus Torvalds <[email protected]>
Wed, 24 Jul 2024 20:04:43 +0000 (13:04 -0700)
Pull soundwire updates from Vinod Koul:

 - Simplification across subsystem using cleanup.h

 - Support for debugfs to read/write commands

 - Few Intel and Qualcomm driver updates

* tag 'soundwire-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
  soundwire: debugfs: simplify with cleanup.h
  soundwire: cadence: simplify with cleanup.h
  soundwire: intel_ace2x: simplify with cleanup.h
  soundwire: intel_ace2x: simplify return path in hw_params
  soundwire: intel: simplify with cleanup.h
  soundwire: intel: simplify return path in hw_params
  soundwire: amd_init: simplify with cleanup.h
  soundwire: amd: simplify with cleanup.h
  soundwire: amd: simplify return path in hw_params
  soundwire: intel_auxdevice: start the bus at default frequency
  soundwire: intel_auxdevice: add cs42l43 codec to wake_capable_list
  drivers:soundwire: qcom: cleanup port maask calculations
  soundwire: bus: simplify by using local slave->prop
  soundwire: generic_bandwidth_allocation: change port_bo parameter to pointer
  soundwire: Intel: clarify Copyright information
  soundwire: intel_ace2.x: add AC timing extensions for PantherLake
  soundwire: bus: add stream refcount
  soundwire: debugfs: add interface to read/write commands

1  2 
drivers/soundwire/amd_manager.c
drivers/soundwire/intel_auxdevice.c

index 795e223f7e5c29b6b1d69b5f66fa32bc0ab50fba,883b83b7bdacc40704c8b5f758c2425c9eca486f..0d01849c358619d9c45acf9ceca0edd619d728c6
@@@ -6,6 -6,7 +6,7 @@@
   */
  
  #include <linux/completion.h>
+ #include <linux/cleanup.h>
  #include <linux/device.h>
  #include <linux/io.h>
  #include <linux/jiffies.h>
@@@ -571,9 -572,6 +572,9 @@@ static int sdw_master_read_amd_prop(str
        amd_manager->wake_en_mask = wake_en_mask;
        fwnode_property_read_u32(link, "amd-sdw-power-mode", &power_mode_mask);
        amd_manager->power_mode_mask = power_mode_mask;
 +
 +      fwnode_handle_put(link);
 +
        return 0;
  }
  
@@@ -603,7 -601,6 +604,6 @@@ static int amd_sdw_hw_params(struct snd
        struct amd_sdw_manager *amd_manager = snd_soc_dai_get_drvdata(dai);
        struct sdw_amd_dai_runtime *dai_runtime;
        struct sdw_stream_config sconfig;
-       struct sdw_port_config *pconfig;
        int ch, dir;
        int ret;
  
        sconfig.bps = snd_pcm_format_width(params_format(params));
  
        /* Port configuration */
-       pconfig = kzalloc(sizeof(*pconfig), GFP_KERNEL);
-       if (!pconfig) {
-               ret =  -ENOMEM;
-               goto error;
-       }
+       struct sdw_port_config *pconfig __free(kfree) = kzalloc(sizeof(*pconfig),
+                                                               GFP_KERNEL);
+       if (!pconfig)
+               return -ENOMEM;
  
        pconfig->num = dai->id;
        pconfig->ch_mask = (1 << ch) - 1;
        if (ret)
                dev_err(amd_manager->dev, "add manager to stream failed:%d\n", ret);
  
-       kfree(pconfig);
- error:
        return ret;
  }
  
index 18517121cc8981c49fd484fadd74339479d6f61d,b8b317b0ab48a1f5f5534a811693da2ec96366df..8807e01cbf7c7e530655776f7f4cf2101b588f42
@@@ -47,6 -47,7 +47,7 @@@ struct wake_capable_part 
  };
  
  static struct wake_capable_part wake_capable_list[] = {
+       {0x01fa, 0x4243},
        {0x025d, 0x5682},
        {0x025d, 0x700},
        {0x025d, 0x711},
@@@ -155,17 -156,35 +156,37 @@@ static int sdw_master_read_intel_prop(s
                SDW_MASTER_QUIRKS_CLEAR_INITIAL_PARITY;
  
        intel_prop = devm_kzalloc(bus->dev, sizeof(*intel_prop), GFP_KERNEL);
 -      if (!intel_prop)
 +      if (!intel_prop) {
 +              fwnode_handle_put(link);
                return -ENOMEM;
 +      }
  
        /* initialize with hardware defaults, in case the properties are not found */
+       intel_prop->clde = 0x0;
+       intel_prop->doaise2 = 0x0;
+       intel_prop->dodse2 = 0x0;
+       intel_prop->clds = 0x0;
+       intel_prop->clss = 0x0;
        intel_prop->doaise = 0x1;
        intel_prop->doais = 0x3;
        intel_prop->dodse  = 0x0;
        intel_prop->dods  = 0x1;
  
+       fwnode_property_read_u16(link,
+                                "intel-sdw-clde",
+                                &intel_prop->clde);
+       fwnode_property_read_u16(link,
+                                "intel-sdw-doaise2",
+                                &intel_prop->doaise2);
+       fwnode_property_read_u16(link,
+                                "intel-sdw-dodse2",
+                                &intel_prop->dodse2);
+       fwnode_property_read_u16(link,
+                                "intel-sdw-clds",
+                                &intel_prop->clds);
+       fwnode_property_read_u16(link,
+                                "intel-sdw-clss",
+                                &intel_prop->clss);
        fwnode_property_read_u16(link,
                                 "intel-sdw-doaise",
                                 &intel_prop->doaise);
                intel_prop->dodse,
                intel_prop->dods);
  
 +      fwnode_handle_put(link);
 +
        return 0;
  }
  
  static int intel_prop_read(struct sdw_bus *bus)
  {
+       struct sdw_master_prop *prop;
        /* Initialize with default handler to read all DisCo properties */
        sdw_master_read_prop(bus);
  
+       /*
+        * Only one bus frequency is supported so far, filter
+        * frequencies reported in the DSDT
+        */
+       prop = &bus->prop;
+       if (prop->clk_freq && prop->num_clk_freq > 1) {
+               unsigned int default_bus_frequency;
+               default_bus_frequency =
+                       prop->default_frame_rate *
+                       prop->default_row *
+                       prop->default_col /
+                       SDW_DOUBLE_RATE_FACTOR;
+               prop->num_clk_freq = 1;
+               prop->clk_freq[0] = default_bus_frequency;
+               prop->max_clk_freq = default_bus_frequency;
+       }
        /* read Intel-specific properties */
        sdw_master_read_intel_prop(bus);
  
This page took 0.074636 seconds and 4 git commands to generate.