1. 12 Sep, 2023 4 commits
    • Richard Fitzgerald's avatar
      ASoC: SOF: Pass PCI SSID to machine driver · ba2de401
      Richard Fitzgerald authored
      Pass the PCI SSID of the audio interface through to the machine driver.
      This allows the machine driver to use the SSID to uniquely identify the
      specific hardware configuration and apply any platform-specific
      configuration.
      
      struct snd_sof_pdata is passed around inside the SOF code, but it then
      passes configuration information to the machine driver through
      struct snd_soc_acpi_mach and struct snd_soc_acpi_mach_params. So SSID
      information has been added to both snd_sof_pdata and
      snd_soc_acpi_mach_params.
      
      PCI does not define 0x0000 as an invalid value so we can't use zero to
      indicate that the struct member was not written. Instead a flag is
      included to indicate that a value has been written to the
      subsystem_vendor and subsystem_device members.
      
      sof_pci_probe() creates the struct snd_sof_pdata. It is passed a struct
      pci_dev so it can fill in the SSID value.
      
      sof_machine_check() finds the appropriate struct snd_soc_acpi_mach. It
      copies the SSID information across to the struct snd_soc_acpi_mach_params.
      This done before calling any custom set_mach_params() so that it could be
      used by the set_mach_params() callback to apply variant params.
      
      The machine driver receives the struct snd_soc_acpi_mach as its
      platform_data.
      Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
      Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Link: https://lore.kernel.org/r/20230912163207.3498161-3-rf@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      ba2de401
    • Richard Fitzgerald's avatar
      ASoC: soc-card: Add storage for PCI SSID · 47f56e38
      Richard Fitzgerald authored
      Add members to struct snd_soc_card to store the PCI subsystem ID (SSID)
      of the soundcard.
      
      The PCI specification provides two registers to store a vendor-specific
      SSID that can be read by drivers to uniquely identify a particular
      "soundcard". This is defined in the PCI specification to distinguish
      products that use the same silicon (and therefore have the same silicon
      ID) so that product-specific differences can be applied.
      
      PCI only defines 0xFFFF as an invalid value. 0x0000 is not defined as
      invalid. So the usual pattern of zero-filling the struct and then
      assuming a zero value unset will not work. A flag is included to
      indicate when the SSID information has been filled in.
      
      Unlike DMI information, which has a free-format entirely up to the vendor,
      the PCI SSID has a strictly defined format and a registry of vendor IDs.
      
      It is usual in Windows drivers that the SSID is used as the sole identifier
      of the specific end-product and the Windows driver contains tables mapping
      that to information about the hardware setup, rather than using ACPI
      properties.
      
      This SSID is important information for ASoC components that need to apply
      hardware-specific configuration on PCI-based systems.
      
      As the SSID is a generic part of the PCI specification and is treated as
      identifying the "soundcard", it is reasonable to include this information
      in struct snd_soc_card, instead of components inventing their own custom
      ways to pass this information around.
      Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
      Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Link: https://lore.kernel.org/r/20230912163207.3498161-2-rf@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      47f56e38
    • Kuninori Morimoto's avatar
      ASoC: rsnd: remove unneeded of_node_put() · b399dc73
      Kuninori Morimoto authored
      The loop is not using "node", of_node_put(node) is not needed.
      
      Cc: Julia Lawall <julia.lawall@inria.fr>
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/8734zlilmd.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      b399dc73
    • Mark Brown's avatar
      SM6115 TX Macro · 2b3357dc
      Mark Brown authored
      Merge series from Konrad Dybcio <konrad.dybcio@linaro.org>:
      
      Like most Qualcomm SoCs, SM6115 has a TX Macro.
      
      Only some minor changes were required.
      2b3357dc
  2. 11 Sep, 2023 36 commits