Ignore:
Timestamp:
Apr 19, 2025, 8:08:37 PM (4 months ago)
Author:
David Azarewicz
Message:

Merge in changes from 6.6-LTS branch.
Fixed additional 25+ problems.

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/hda/hdac_regmap.c

    r695 r772  
    1818#include <linux/export.h>
    1919#include <linux/pm.h>
    20 #include <linux/pm_runtime.h>
    2120#include <sound/core.h>
    2221#include <sound/hdaudio.h>
     
    359358        .readable_reg = hda_readable_reg,
    360359        .volatile_reg = hda_volatile_reg,
     360#ifndef TARGET_OS2
     361        .cache_type = REGCACHE_MAPLE,
     362#else
    361363        .cache_type = REGCACHE_RBTREE,
     364#endif
    362365        .reg_read = hda_reg_read,
    363366        .reg_write = hda_reg_write,
     
    570573                               unsigned int mask, unsigned int val)
    571574{
     575#ifndef TARGET_OS2
     576        int err = 0;
     577#else
    572578        unsigned int orig;
    573579        int err;
    574 
     580#endif
    575581        if (!codec->regmap)
    576582                return reg_raw_update(codec, reg, mask, val);
    577583
    578584        mutex_lock(&codec->regmap_lock);
     585#ifndef TARGET_OS2
     586        /* Discard any updates to already initialised registers. */
     587        if (!regcache_reg_cached(codec->regmap, reg))
     588#else
    579589        regcache_cache_only(codec->regmap, true);
    580590        err = regmap_read(codec->regmap, reg, &orig);
    581591        regcache_cache_only(codec->regmap, false);
    582592        if (err < 0)
     593#endif
    583594                err = regmap_update_bits(codec->regmap, reg, mask, val);
    584595        mutex_unlock(&codec->regmap_lock);
     
    614625void snd_hdac_regmap_sync(struct hdac_device *codec)
    615626{
    616         if (codec->regmap) {
    617                 mutex_lock(&codec->regmap_lock);
     627        mutex_lock(&codec->regmap_lock);
     628        if (codec->regmap)
    618629                regcache_sync(codec->regmap);
    619                 mutex_unlock(&codec->regmap_lock);
    620         }
     630        mutex_unlock(&codec->regmap_lock);
    621631}
    622632EXPORT_SYMBOL_GPL(snd_hdac_regmap_sync);
Note: See TracChangeset for help on using the changeset viewer.