ASoC: tas2770: Fix volume scale
Subsystems (7)
Sasha Levin
maintainerPATCH 1/8 ASoC: tas2770: Fix volume scale
From: Hector Martin <[email protected]>
[ Upstream commit 579cd64b9df8a60284ec3422be919c362de40e41 ]
The scale starts at -100dB, not -128dB.
--- sound/soc/codecs/tas2770.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tas2770.c +1 -1
@@ -508,7 +508,7 @@ static int tas2770_codec_probe(struct snd_soc_component *component) } static DECLARE_TLV_DB_SCALE(tas2770_digital_tlv, 1100, 50, 0); -static DECLARE_TLV_DB_SCALE(tas2770_playback_volume, -12750, 50, 0); +static DECLARE_TLV_DB_SCALE(tas2770_playback_volume, -10050, 50, 0);static const struct snd_kcontrol_new tas2770_snd_controls[] = { SOC_SINGLE_TLV("Speaker Playback Volume", TAS2770_PLAY_CFG_REG2,
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 2/8 ASoC: tas2764: Fix power control mask
From: Hector Martin <[email protected]>
[ Upstream commit a3f172359e22b2c11b750d23560481a55bf86af1 ]
--- sound/soc/codecs/tas2764.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tas2764.h +1 -1
@@ -25,7 +25,7 @@/* Power Control */ #define TAS2764_PWR_CTRL TAS2764_REG(0X0, 0x02) -#define TAS2764_PWR_CTRL_MASK GENMASK(1, 0) +#define TAS2764_PWR_CTRL_MASK GENMASK(2, 0)#define TAS2764_PWR_CTRL_ACTIVE 0x0#define TAS2764_PWR_CTRL_MUTE BIT(0)#define TAS2764_PWR_CTRL_SHUTDOWN BIT(1)
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 3/8 ASoC: tas2764: Set the SDOUT polarity correctly
In reply to Sasha LevinFrom: Hector Martin <[email protected]>
[ Upstream commit f5468beeab1b1adfc63c2717b1f29ef3f49a5fab ]
TX launch polarity needs to be the opposite of RX capture polarity, to generate the right bit slot alignment.
--- sound/soc/codecs/tas2764.c | 10 +++++++++- sound/soc/codecs/tas2764.h | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-)
sound/soc/codecs/tas2764.c +9 -1
@@ -315,7 +315,7 @@ static int tas2764_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) {struct snd_soc_component *component = dai->component;struct tas2764_priv *tas2764 =snd_soc_component_get_drvdata (component); -u8 tdm_rx_start_slot =0 , asi_cfg_0 =0 , asi_cfg_1 =0 ; +u8 tdm_rx_start_slot =0 , asi_cfg_0 =0 , asi_cfg_1 =0 , asi_cfg_4 =0 ;int ret;switch (fmt &SND_SOC_DAIFMT_INV_MASK ) {
@@ -324,12 +324,14 @@ static int tas2764_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) fallthrough;case SND_SOC_DAIFMT_NB_NF : asi_cfg_1 =TAS2764_TDM_CFG1_RX_RISING ; + asi_cfg_4 =TAS2764_TDM_CFG4_TX_FALLING ;break ;case SND_SOC_DAIFMT_IB_IF : asi_cfg_0 ^=TAS2764_TDM_CFG0_FRAME_START ; fallthrough;case SND_SOC_DAIFMT_IB_NF : asi_cfg_1 =TAS2764_TDM_CFG1_RX_FALLING ; + asi_cfg_4 =TAS2764_TDM_CFG4_TX_RISING ;break ; }
@@ -339,6 +341,12 @@ static int tas2764_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)if (ret <0 )return ret; + ret =snd_soc_component_update_bits (component,TAS2764_TDM_CFG4 , +TAS2764_TDM_CFG4_TX_MASK , + asi_cfg_4); +if (ret <0 ) +return ret; +switch (fmt &SND_SOC_DAIFMT_FORMAT_MASK ) {case SND_SOC_DAIFMT_I2S : asi_cfg_0 ^=TAS2764_TDM_CFG0_FRAME_START ;
sound/soc/codecs/tas2764.h +6 -0
@@ -75,6 +75,12 @@#define TAS2764_TDM_CFG3_RXS_SHIFT 0x4#define TAS2764_TDM_CFG3_MASK GENMASK(3, 0) +/* TDM Configuration Reg4 */ +#define TAS2764_TDM_CFG4 TAS2764_REG(0X0, 0x0d) +#define TAS2764_TDM_CFG4_TX_MASK BIT(0) +#define TAS2764_TDM_CFG4_TX_RISING 0x0 +#define TAS2764_TDM_CFG4_TX_FALLING BIT(0) +/* TDM Configuration Reg5 */ #define TAS2764_TDM_CFG5 TAS2764_REG(0X0, 0x0e)#define TAS2764_TDM_CFG5_VSNS_MASK BIT(6)
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 4/8 fuse: don't truncate cached, mutated symlink
In reply to Sasha LevinFrom: Miklos Szeredi <[email protected]>
[ Upstream commit b4c173dfbb6c78568578ff18f9e8822d7bd0e31b ]
Fuse allows the value of a symlink to change and this property is exploited by some filesystems (e.g. CVMFS).
It has been observed, that sometimes after changing the symlink contents, the value is truncated to the old size.
This is caused by fuse_getattr() racing with fuse_reverse_inval_inode(). fuse_reverse_inval_inode() updates the fuse_inode's attr_version, which results in fuse_change_attributes() exiting before updating the cached attributes
This is okay, as the cached attributes remain invalid and the next call to fuse_change_attributes() will likely update the inode with the correct values.
The reason this causes problems is that cached symlinks will be returned through page_get_link(), which truncates the symlink to inode->i_size. This is correct for filesystems that don't mutate symlinks, but in this case it causes bad behavior.
The solution is to just remove this truncation. This can cause a regression in a filesystem that relies on supplying a symlink larger than the file size, but this is unlikely. If that happens we'd need to make this behavior conditional.
--- fs/fuse/dir.c | 2 +- fs/namei.c | 24 +++++++++++++++++++----- include/linux/fs.h | 2 ++ 3 files changed, 22 insertions(+), 6 deletions(-)
fs/fuse/dir.c +1 -1
@@ -1384,7 +1384,7 @@ static const char *fuse_get_link(struct dentry *dentry, struct inode *inode, goto out_err;if (fc->cache_symlinks) -return page_get_link (dentry, inode, callback); +return page_get_link_raw (dentry, inode, callback); err = -ECHILD ;if (!dentry)
fs/namei.c +19 -5
@@ -4678,10 +4678,9 @@ const char *vfs_get_link(struct dentry *dentry, struct delayed_call *done)EXPORT_SYMBOL (vfs_get_link);/* get the link contents into pagecache */ -const char *page_get_link (struct dentry *dentry,struct inode *inode, -struct delayed_call *callback) +static char *__page_get_link (struct dentry *dentry,struct inode *inode, +struct delayed_call *callback) { -char *kaddr;struct page *page;struct address_space *mapping = inode->i_mapping;
@@ -4700,8 +4699,23 @@ const char *page_get_link(struct dentry *dentry, struct inode *inode, }set_delayed_call (callback, page_put_link, page);BUG_ON (mapping_gfp_mask (mapping) & __GFP_HIGHMEM); - kaddr =page_address (page); -nd_terminate_link (kaddr, inode->i_size,PAGE_SIZE -1 ); +return page_address (page); +} + +const char *page_get_link_raw (struct dentry *dentry,struct inode *inode, +struct delayed_call *callback) +{ +return __page_get_link (dentry, inode, callback); +} +EXPORT_SYMBOL_GPL (page_get_link_raw); + +const char *page_get_link (struct dentry *dentry,struct inode *inode, +struct delayed_call *callback) +{ +char *kaddr =__page_get_link (dentry, inode, callback); + +if (!IS_ERR (kaddr)) +nd_terminate_link (kaddr, inode->i_size,PAGE_SIZE -1 );return kaddr; }
include/linux/fs.h +2 -0
@@ -3242,6 +3242,8 @@ extern const struct file_operations generic_ro_fops;extern int readlink_copy (char __user *,int ,const char *);extern int page_readlink (struct dentry *,char __user *,int ); +extern const char *page_get_link_raw (struct dentry *,struct inode *, +struct delayed_call *);extern const char *page_get_link (struct dentry *,struct inode *,struct delayed_call *);extern void page_put_link (void *);
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 5/8 x86/irq: Define trace events conditionally
In reply to Sasha LevinFrom: Arnd Bergmann <[email protected]>
[ Upstream commit 9de7695925d5d2d2085681ba935857246eb2817d ]
When both of X86_LOCAL_APIC and X86_THERMAL_VECTOR are disabled, the irq tracing produces a W=1 build warning for the tracing definitions:
In file included from include/trace/trace_events.h:27,
from include/trace/define_trace.h:113,
from arch/x86/include/asm/trace/irq_vectors.h:383,
from arch/x86/kernel/irq.c:29: include/trace/stages/init.h:2:23: error: 'str__irq_vectors__trace_system_name' defined but not used [-Werror=unused-const-variable=]
Make the tracepoints conditional on the same symbosl that guard their usage.
--- arch/x86/kernel/irq.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/kernel/irq.c +2 -0
@@ -22,8 +22,10 @@#include <asm/desc.h> #include <asm/traps.h> +#if defined(CONFIG_X86_LOCAL_APIC ) || defined(CONFIG_X86_THERMAL_VECTOR )#define CREATE_TRACE_POINTS #include <asm/trace/irq_vectors.h> +#endif DEFINE_PER_CPU_SHARED_ALIGNED (irq_cpustat_t, irq_stat);EXPORT_PER_CPU_SYMBOL (irq_stat);
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 6/8 mptcp: safety check before fallback
In reply to Sasha LevinFrom: "Matthieu Baerts (NGI0)" <[email protected]>
[ Upstream commit db75a16813aabae3b78c06b1b99f5e314c1f55d3 ]
Recently, some fallback have been initiated, while the connection was not supposed to fallback.
Add a safety check with a warning to detect when an wrong attempt to fallback is being done. This should help detecting any future issues quicker.
--- net/mptcp/protocol.h | 2 ++ 1 file changed, 2 insertions(+)
net/mptcp/protocol.h +2 -0
@@ -530,6 +530,8 @@ static inline void __mptcp_do_fallback(struct mptcp_sock *msk)pr_debug ("TCP fallback already done (msk=%p)\n" , msk);return ; } +if (WARN_ON_ONCE (!READ_ONCE (msk->allow_infinite_fallback))) +return ;set_bit (MPTCP_FALLBACK_DONE , &msk->flags); }
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 7/8 drm/nouveau: Do not override forced connector status
In reply to Sasha LevinFrom: Thomas Zimmermann <[email protected]>
[ Upstream commit 01f1d77a2630e774ce33233c4e6723bca3ae9daa ]
Keep user-forced connector status even if it cannot be programmed. Same behavior as for the rest of the drivers.
--- drivers/gpu/drm/nouveau/nouveau_connector.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_connector.c +0 -1
@@ -751,7 +751,6 @@ nouveau_connector_force(struct drm_connector *connector)if (!nv_encoder) {NV_ERROR (drm,"can't find encoder to force %s on!\n" , connector->name); - connector->status = connector_status_disconnected;return ; }
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 8/8 block: fix 'kmem_cache of name 'bio-108' already exists'
In reply to Sasha LevinFrom: Ming Lei <[email protected]>
[ Upstream commit b654f7a51ffb386131de42aa98ed831f8c126546 ]
Device mapper bioset often has big bio_slab size, which can be more than 1000, then 8byte can't hold the slab name any more, cause the kmem_cache allocation warning of 'kmem_cache of name 'bio-108' already exists'.
Fix the warning by extending bio_slab->name to 12 bytes, but fix output of /proc/slabinfo
--- block/bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/bio.c +1 -1
@@ -55,7 +55,7 @@ struct bio_slab {struct kmem_cache *slab;unsigned int slab_ref;unsigned int slab_size; -char name[8 ]; +char name[12 ]; };static DEFINE_MUTEX (bio_slab_lock);static struct bio_slab *bio_slabs;
Signature · 1 line
2.39.5