This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TAS2781:TAS2781上的 CAN't 控制音量

Guru**** 657930 points
Other Parts Discussed in Thread: TAS2781, PUREPATHCONSOLE
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/audio-group/audio/f/audio-forum/1282425/tas2781-can-t-control-volume-on-tas2781

器件型号:TAS2781
主题中讨论的其他器件: PUREPATHCONSOLE

您好!

我有联想瑜伽与 TAS2781 ,我能够使它与6.6 rc5内核工作。 遗憾的是、低音扬声器的音量控制不起作用。 当我将音量降低到零时、它们也会静音。

这里有其他人报告了同样的问题- https://forums.lenovo.com/t5/Ubuntu/Ubuntu-and-legion-pro-7-16IRX8H-audio-issues/m-p/5210709?page=18#6129762

这是 i2c 器件显示的功能

ls -la /sys/bus/i2c/devices
...
1 lrwxrwxrwx root root 0 Oct 18 15:28 i2c-TIAS2781:00 -> ../../../devices/platform/AMDI0010:03/i2c-3/i2c-TIAS2781:00

sudo i2cdetect -r 3

I will probe file /dev/i2c-3 using receive byte commands.
I will probe address range 0x08-0x77.
Continue? [Y/n]
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- 38 39 -- 3b -- UU -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

和 ACPI 表

e2e.ti.com/.../acpi_5F00_tables.zip

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这里是一些更多信息、可以帮助您

    dmesg|grep 2781
    [    5.104068] snd_hda_codec_realtek hdaudioC1D0: bound i2c-TIAS2781:00 (ops tas2781_hda_comp_ops [snd_hda_scodec_tas2781_i2c])
    
    grep 2781 /boot/config-6.6.0-rc5-custom 
    CONFIG_W1_SLAVE_DS2781=m
    CONFIG_BATTERY_DS2781=m
    CONFIG_SND_HDA_SCODEC_TAS2781_I2C=m
    CONFIG_SND_SOC_TAS2781_COMLIB=m
    CONFIG_SND_SOC_TAS2781_FMWLIB=m
    CONFIG_SND_SOC_TAS2781_I2C=m
    
    lsmod|grep 2781
    snd_hda_scodec_tas2781_i2c    28672  0
    snd_soc_tas2781_fmwlib    45056  1 snd_hda_scodec_tas2781_i2c
    snd_soc_tas2781_comlib    20480  2 snd_soc_tas2781_fmwlib,snd_hda_scodec_tas2781_i2c
    snd_soc_core          446464  5 snd_sof,snd_soc_ps_mach,snd_ps_pdm_dma,snd_soc_dmic,snd_hda_scodec_tas2781_i2c
    snd                   143360  46 snd_ctl_led,snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_sof,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_hda_scodec_tas2781_i2c,snd_rawmidi
    crc8                   12288  2 snd_soc_tas2781_fmwlib,snd_soc_tas2781_comlib
    

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好,Guiy

    请在根模式中键入"amixer",并与我一起发送日志。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这是输出

    amixer -c 1
    
    Simple mixer control 'Master',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono
      Limits: Playback 0 - 87
      Mono: Playback 87 [100%] [0.00dB] [on]
    Simple mixer control 'Headphone',0
      Capabilities: pvolume pswitch
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 87
      Mono:
      Front Left: Playback 52 [60%] [-26.25dB] [off]
      Front Right: Playback 52 [60%] [-26.25dB] [off]
    Simple mixer control 'Speaker',0
      Capabilities: pvolume pswitch
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 87
      Mono:
      Front Left: Playback 14 [16%] [-54.75dB] [on]
      Front Right: Playback 14 [16%] [-54.75dB] [on]
    Simple mixer control 'Bass Speaker',0
      Capabilities: pswitch
      Playback channels: Front Left - Front Right
      Mono:
      Front Left: Playback [on]
      Front Right: Playback [on]
    Simple mixer control 'Mic ACP LED',0
      Capabilities: cswitch cswitch-joined
      Capture channels: Mono
      Mono: Capture [on]
    Simple mixer control 'Mic Boost',0
      Capabilities: volume
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: 0 - 3
      Front Left: 0 [0%] [0.00dB]
      Front Right: 0 [0%] [0.00dB]
    Simple mixer control 'Capture',0
      Capabilities: cvolume cswitch
      Capture channels: Front Left - Front Right
      Limits: Capture 0 - 63
      Front Left: Capture 38 [60%] [11.25dB] [on]
      Front Right: Capture 38 [60%] [11.25dB] [on]
    Simple mixer control 'Auto-Mute Mode',0
      Capabilities: enum
      Items: 'Disabled' 'Enabled'
      Item0: 'Disabled'
    

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这里也是 alsa-info 作为 root 生成的所有信息。

    alsa-project.org/.../

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    驱动程序代码已实现 "Spier Digital Gain"和 "Spaker Analog Gain"、您可以使用 amixer 在命令行中设置增益

    State.Generic_1 { CONTROL.1{
    
    
    清单卡名称"Speedaker 配置文件 ID"
    值0
    注释{
    存取'读写'
    类型整数
    计数1
    范围'0-1'
    }} CONTROL.2{清单
    
    
    卡
    名称"Speedaker 模拟增益"
    值13
    注释{
    存取
    
    
    '读写'类型整数计数1范围'0-20'
    dbmin 1100
    dbmax 2100
    dbvalue.0 1750
    }
    
    control.3 {
    iface 卡
    名称"Speaker 数字增益
    
    
    "值200注释{访问'read 写
    
    
    '类型整数计数1范围'0-200'
    dbmin -10000 dbmax
    10000 dbvalue.0 10000}}
    
    
    
    控制.4 { iface
    卡
    名称"Speaker 强制固件加载"
    值 false
    注释{
    ACCESS 'READ WRITE'
    类型布尔
    
    
    
    
    
    
    值1}} CONTROL.5
    {iface card name 'SPEaker Program ID' value 0 comment{
    ACCESS 'READ WRITE'
    type integer
    count 1
    range '0-0'
    }}
    
    CONTROL.6
    
    
    
    {iface card name 'SPEaker Config ID' value 0 comment{
    ACCESS 'READ 写入"
    类型整数
    计数1
    范围'0-1'
    }}
    
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我尝试更改了"计时数字增益"和"计时模拟增益"。

    模拟增益对音量没有影响。

    数字增益最初显示为200、减小后会导致音量减小。 音量提高了180度、就再也听不到了。

    这就是您希望这两个控件执行的操作吗?

    经过一些改动后、扬声器停止工作、这在 dmesg 中出现

    [ 1448.550754] i2c_designware AMDI0010:03: i2c_dw_handle_tx_abort: lost arbitration
    [ 1449.564662] i2c_designware AMDI0010:03: controller timed out
    [ 1449.564711] tas2781-hda i2c-TIAS2781:00: tasdevice_dev_bulk_write, E=-110
    [ 1449.564721] tas2781-hda i2c-TIAS2781:00: tasdevice_process_block: bulk_write error = -110
    [ 1450.588671] i2c_designware AMDI0010:03: controller timed out
    [ 1450.588725] tas2781-hda i2c-TIAS2781:00: tasdevice_change_chn_book, E=-110
    [ 1450.588734] tas2781-hda i2c-TIAS2781:00: tasdevice_process_block: bulk_write error = -110
    [ 1451.613542] i2c_designware AMDI0010:03: controller timed out
    [ 1451.613589] tas2781-hda i2c-TIAS2781:00: tasdevice_change_chn_book, E=-110
    [ 1451.613595] tas2781-hda i2c-TIAS2781:00: tasdevice_digital_getvol, get digital vol error
    [ 1452.637700] i2c_designware AMDI0010:03: controller timed out
    [ 1452.637762] tas2781-hda i2c-TIAS2781:00: tasdevice_dev_bulk_write, E=-110
    [ 1452.637771] tas2781-hda i2c-TIAS2781:00: tasdevice_process_block: bulk_write error = -110
    [ 1453.661146] i2c_designware AMDI0010:03: controller timed out
    [ 1453.661205] tas2781-hda i2c-TIAS2781:00: tasdevice_change_chn_book, E=-110
    [ 1453.661214] tas2781-hda i2c-TIAS2781:00: tasdevice_process_block: bulk_write error = -110
    [ 1454.684644] i2c_designware AMDI0010:03: controller timed out
    [ 1454.684675] tas2781-hda i2c-TIAS2781:00: tasdevice_change_chn_book, E=-110
    [ 1454.684680] tas2781-hda i2c-TIAS2781:00: tasdevice_amp_getvol, get AMP vol error
    [ 1455.708647] i2c_designware AMDI0010:03: controller timed out
    [ 1455.708682] tas2781-hda i2c-TIAS2781:00: tasdevice_dev_bulk_write, E=-110
    [ 1455.708690] tas2781-hda i2c-TIAS2781:00: tasdevice_process_block: bulk_write error = -110
    [ 1456.733125] i2c_designware AMDI0010:03: controller timed out
    [ 1456.733157] tas2781-hda i2c-TIAS2781:00: tasdevice_change_chn_book, E=-110
    [ 1456.733162] tas2781-hda i2c-TIAS2781:00: tasdevice_process_block: bulk_write error = -110
    [ 1457.756654] i2c_designware AMDI0010:03: controller timed out
    [ 1457.756706] tas2781-hda i2c-TIAS2781:00: tasdevice_change_chn_book, E=-110
    [ 1457.756714] tas2781-hda i2c-TIAS2781:00: tasdevice_digital_getvol, get digital vol error

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您的参与。 如您所知、我们已退回了所有联想笔记本电脑。 解决此问题在很大程度上取决于您的 合作和耐心。

    当我下星期一回到办公室时,我将 深入研究这一问题。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    谢谢升豪

    我愿意为解决此问题提供任何帮助。 "你要我做什么?"

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我有关于超时的问题、是 i2c 总线问题吗?

    如何运行命令? 您是否以根模式运行它?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    是的、我确实是在根模式下运行它的。 这是另一个时间:

    [root@fedora ~]# i2cdetect -r 3
    WARNING! This program can confuse your I2C bus, cause data loss and worse!
    I will probe file /dev/i2c-3 using receive byte commands.
    I will probe address range 0x08-0x77.
    Continue? [Y/n] 
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:                         -- -- -- -- -- -- -- -- 
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    30: -- -- -- -- -- -- -- -- 38 39 -- 3b -- UU -- -- 
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    50: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- 
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    70: -- -- -- -- -- -- -- -- 

    但超时与 i2cdetect 命令无关。 超时会随机发生一次。 一旦发生、重新启动计算机将不起作用。 我想,我需要拔出电源线,关机,然后当我启动音频工作再次.

    我也不知道扬声器模拟增益为什么不起作用。 这是否起作用?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    另一个问题(可能是不相关的)是每次播放歌曲时、数字增益重置为200、低音开始爆破。 当我将其设置为较低的值时、它会在歌曲持续时间内以及歌曲结束后保持低电平。 但一旦我开始一首新歌-值再次重置为200。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    系统每次都会重新加载 tas2781的寄存器设置和 DSP 设置。 因此、该问题将取决于系统调用。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    与我们的调优人员进行了确认。 已在 reg.bin 文件中将模拟增益设置为固定值。 是否要设置较低的值、我可以要求他们 从 reg.bin 中删除此设置、然后为您提供新设置。 还有一点、模拟增益应在 tas2781上电之前设置。 您可以在播放之前对其进行设置、然后使用新的 regbin 文件播放音乐

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这似乎没有什么其他声卡的行为,我不知道如何修复它在这种情况下. 你知道吗?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    不确定哪个文件是 reg.bin。 您是指/lib/firmware?中的文件吗? 或者这是关于 Cali_data efivar 吗? 设计是否使得用户不应触碰模拟增益而只使用数字增益?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    模拟增益已在以下寄存器 bin 文件中删除、您可以覆盖/lib/firmware.中的相应 bin 文件

    e2e.ti.com/.../TIAS2781RCA4.bin

    在之前的 TIAS2781RC4.bin 中、所有 tas2781在您的笔记本电脑中都设置为16.5dbV 的模拟增益。 任何高于16.5的值将导致电源电压问题和没有声音或笔记本电脑重新启动。 如您所知、默认值为48kHz 时为21dbV、它将导致笔记本电脑在该设置下重新启动。

    以下设置表是模拟增益、它位于 book0page0reg3中

    更换 bin 文件。 重新启动笔记本电脑。 先用 amixer 命令进行设置,然后再播放。 希望这可以帮助您。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Shenghao:

    由于新文件的最大数字音量输出比以前大得多。 模拟增益仍无任何影响。 这不是问题。 只使用数字音量进行控制就可以了。

    但有两个问题:

    *第一个问题是数字增益值不断被重置。 我为`tas2781_hda_i2c.c`启用了调试消息、并且在驱动程序执行运行时暂停/恢复时、设置似乎会丢失、如下所示:

    [ 2030.992757] tas2781-hda i2c-TIAS2781:00: Runtime Suspend
    [ 2065.757939] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 0
    [ 2065.757950] tas2781-hda i2c-TIAS2781:00: Runtime Resume
    [ 2068.248873] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 1
    [ 2068.248884] tas2781-hda i2c-TIAS2781:00: Playback action not supported: 1
    [ 2068.249578] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 1
    [ 2068.249583] tas2781-hda i2c-TIAS2781:00: Playback action not supported: 1
    [ 2078.296277] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 2
    [ 2078.296288] tas2781-hda i2c-TIAS2781:00: Playback action not supported: 2
    [ 2078.296374] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 3
    [ 2081.365165] tas2781-hda i2c-TIAS2781:00: Runtime Suspend
    

    当运行时恢复发生时、我在最后一次运行时暂停之前设置的值丢失、数字增益再次设置为200。 是否可以更改2781驱动程序以保留该设置?

    *第二个问题是,即使数字增益工作,设置音量真的很尴尬。 增大整体音量需要提高普通扬声器的音量、然后再增大2781数字增益。 减小也要求减小这两者。 当正常的扬声器音量改变时、是否也可以改变2781音量? 然后有一个 ALSA 控制,只调节2781低音和普通扬声器之间的平衡? 这样它就能像在 Windows 中一样工作。 正常运行只需要更改一个卷。 如果需要将低音增强至降低-这将是额外的控制、不会经常改变。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    问题1: 我将在本周五向您发布一个新代码。  

    问题2:关于如何覆盖系统 vol 控制为 tas2781,请咨询 ubuntu, 作为一个 Linux 驱动程序的家伙,我已经提供了接口,但我不知道如何覆盖它。 如果你知道该怎么做,请告诉我。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    请运行驱动程序+数字增益控制、并与我分享日志。

    e2e.ti.com/.../4784.ftc.7z

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这不能解决问题

    -- The Speaker Digital Gain is set to 201. If audio doesn't play for a couple seconds the amp suspends
    2023-10-28T22:24:03.232664-07:00 yoda kernel: [  123.613187] tas2781-hda i2c-TIAS2781:00: Runtime Suspend
    -- I ran here "amixer cset numid=3 180" to set the Speaker Digital Gain to 180
    2023-10-28T22:24:30.133538-07:00 yoda kernel: [  150.513732] tas2781-hda i2c-TIAS2781:00: tasdevice_digital_putvol 0x001a val=21
    -- I play a sound here - the sound is again loud and the control shows 201
    2023-10-28T22:24:34.120967-07:00 yoda kernel: [  154.500959] snd_hda_intel 0000:c3:00.6: display power enable
    2023-10-28T22:24:34.121000-07:00 yoda kernel: [  154.500973] snd_hda_intel 0000:c3:00.6: Setting ATI snoop: 1
    2023-10-28T22:24:34.121004-07:00 yoda kernel: [  154.504421] snd_hda_intel 0000:c3:00.6: display power disable
    2023-10-28T22:24:34.168688-07:00 yoda kernel: [  154.551650] snd_hda_codec_realtek hdaudioC1D0: ALC287: Apply fix-func for (null)
    2023-10-28T22:24:34.168714-07:00 yoda kernel: [  154.551677] snd_hda_codec_realtek hdaudioC1D0: ALC287: Apply fix-func for (null)
    2023-10-28T22:24:34.168717-07:00 yoda kernel: [  154.551679] snd_hda_codec_realtek hdaudioC1D0: ALC287: Apply fix-func for (null)
    2023-10-28T22:24:34.168721-07:00 yoda kernel: [  154.551794] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 0
    2023-10-28T22:24:34.168723-07:00 yoda kernel: [  154.551804] tas2781-hda i2c-TIAS2781:00: Runtime Resume
    2023-10-28T22:24:36.900659-07:00 yoda kernel: [  157.283806] snd_hda_codec_realtek hdaudioC1D0: hda_codec_setup_stream: NID=0x2, stream=0x5, channel=0, format=0x31
    2023-10-28T22:24:36.912766-07:00 yoda kernel: [  157.292911] snd_hda_codec_realtek hdaudioC1D0: hda_codec_setup_stream: NID=0x3, stream=0x5, channel=0, format=0x31
    2023-10-28T22:24:36.924831-07:00 yoda kernel: [  157.305314] snd_hda_codec_realtek hdaudioC1D0: hda_codec_setup_stream: NID=0x6, stream=0x5, channel=0, format=0x31
    2023-10-28T22:24:36.936705-07:00 yoda kernel: [  157.317267] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 1
    2023-10-28T22:24:36.936743-07:00 yoda kernel: [  157.317279] tas2781-hda i2c-TIAS2781:00: Playback action not supported: 1
    2023-10-28T22:24:36.936746-07:00 yoda kernel: [  157.317922] snd_hda_codec_realtek hdaudioC1D0: hda_codec_setup_stream: NID=0x2, stream=0x5, channel=0, format=0x31
    2023-10-28T22:24:36.936749-07:00 yoda kernel: [  157.317928] snd_hda_codec_realtek hdaudioC1D0: hda_codec_setup_stream: NID=0x3, stream=0x5, channel=0, format=0x31
    2023-10-28T22:24:36.936752-07:00 yoda kernel: [  157.317932] snd_hda_codec_realtek hdaudioC1D0: hda_codec_setup_stream: NID=0x6, stream=0x5, channel=0, format=0x31
    2023-10-28T22:24:36.936754-07:00 yoda kernel: [  157.317936] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 1
    2023-10-28T22:24:36.936756-07:00 yoda kernel: [  157.317939] tas2781-hda i2c-TIAS2781:00: Playback action not supported: 1
    

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好  

    感谢您的参与。 如果 tas2781不起作用、请勿设置数字增益。

    在播放过程中、如果设置了数字增益、我想知道音量是否会改变?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    在播放期间、数字增益的变化会使音量发生细微变化。

    >如果 tas2781不起作用,请不要设置数字增益。

    如果我不触摸数字增益、它会在恢复后立即复位到201。 如果我在恢复发生之前进行了设置、恢复仍会重置为201。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您的耐心、请允许我在本周二更改 bin 文件。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    请使用此 bin 文件。 谢谢

    e2e.ti.com/.../6763.TIAS2781RCA4.bin

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这没用。 数字增益仍会复位。

    只是为了说明一下。 tasdevice_prumg_load (tas_priv、tas_priv->cur_prog)调用将重置该值。

    当被调用时、`/sys/kernel/debug/regmap/i2c-TIAS2781:00/registers`中0x1A (这是基于数据表的数字增益)处的值从暂停前设置的值变为0。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    因此在最新的 bin 文件(6763.TIAS2781RCA4.bin)中、它可以正常工作、但数字增益仍复位。 对吧?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Shenghao:

    是的、这是正确的。数字增益在运行时恢复时复位。

    谢谢。

    达林

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    下周、我将满足您的要求、并将在下周与您一起发布新代码。 请帮助在您的笔记本电脑上进行测试,并告诉我结果,这样我就可以上传它的内核邮件。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢盛豪耐心对待这件事。

    是的、我会在您拥有后进行测试。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    e2e.ti.com/.../7002.tas2781.7z

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    此操作可解决此问题。 我使用6.6来试用它。 以下是从恢复到暂停的 dbg 消息:

    2023-11-03T19:55:58.928691-07:00 yoda kernel: [  208.318026] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 0
    2023-11-03T19:55:58.928694-07:00 yoda kernel: [  208.318032] tas2781-hda i2c-TIAS2781:00: Runtime Resume
    2023-11-03T19:56:01.515994-07:00 yoda kernel: [  210.904902] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 1
    2023-11-03T19:56:01.516019-07:00 yoda kernel: [  210.905584] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 1
    2023-11-03T19:56:01.516021-07:00 yoda kernel: [  210.905586] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 1
    2023-11-03T19:56:01.516022-07:00 yoda kernel: [  210.906124] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 1
    2023-11-03T19:56:01.516025-07:00 yoda kernel: [  210.906479] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 1
    2023-11-03T19:56:01.516026-07:00 yoda kernel: [  210.906830] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 1
    2023-11-03T19:56:01.516028-07:00 yoda kernel: [  210.906966] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 1
    2023-11-03T19:56:01.516031-07:00 yoda kernel: [  210.907183] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 1
    2023-11-03T19:56:01.516033-07:00 yoda kernel: [  210.907540] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 1
    2023-11-03T19:56:01.516035-07:00 yoda kernel: [  210.907758] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 1
    2023-11-03T19:56:01.516039-07:00 yoda kernel: [  210.908029] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 2
    2023-11-03T19:56:01.519964-07:00 yoda kernel: [  210.908718] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 2
    2023-11-03T19:56:01.519967-07:00 yoda kernel: [  210.908855] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 2
    2023-11-03T19:56:01.519969-07:00 yoda kernel: [  210.909392] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 2
    2023-11-03T19:56:01.519970-07:00 yoda kernel: [  210.909744] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 2
    2023-11-03T19:56:01.519973-07:00 yoda kernel: [  210.910099] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 2
    2023-11-03T19:56:01.519975-07:00 yoda kernel: [  210.910234] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 2
    2023-11-03T19:56:01.519976-07:00 yoda kernel: [  210.910453] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 2
    2023-11-03T19:56:01.519977-07:00 yoda kernel: [  210.910803] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 2
    2023-11-03T19:56:01.519980-07:00 yoda kernel: [  210.911015] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 2
    2023-11-03T19:56:01.519982-07:00 yoda kernel: [  210.911285] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 3
    2023-11-03T19:56:01.519984-07:00 yoda kernel: [  210.911955] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 3
    2023-11-03T19:56:01.519986-07:00 yoda kernel: [  210.912092] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 3
    2023-11-03T19:56:01.519990-07:00 yoda kernel: [  210.912625] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 3
    2023-11-03T19:56:01.523961-07:00 yoda kernel: [  210.912986] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 3
    2023-11-03T19:56:01.523962-07:00 yoda kernel: [  210.913334] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 3
    2023-11-03T19:56:01.523964-07:00 yoda kernel: [  210.913474] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 3
    2023-11-03T19:56:01.523967-07:00 yoda kernel: [  210.913693] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 3
    2023-11-03T19:56:01.523968-07:00 yoda kernel: [  210.914047] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 3
    2023-11-03T19:56:01.523970-07:00 yoda kernel: [  210.914264] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 3
    2023-11-03T19:56:01.523973-07:00 yoda kernel: [  210.914535] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 4
    2023-11-03T19:56:01.523974-07:00 yoda kernel: [  210.915208] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 4
    2023-11-03T19:56:01.523976-07:00 yoda kernel: [  210.915345] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 4
    2023-11-03T19:56:01.523979-07:00 yoda kernel: [  210.915884] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 4
    2023-11-03T19:56:01.523980-07:00 yoda kernel: [  210.916234] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 4
    2023-11-03T19:56:01.523982-07:00 yoda kernel: [  210.916592] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 4
    2023-11-03T19:56:01.529563-07:00 yoda kernel: [  210.916736] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 4
    2023-11-03T19:56:01.529579-07:00 yoda kernel: [  210.916949] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 4
    2023-11-03T19:56:01.529582-07:00 yoda kernel: [  210.917296] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 4
    2023-11-03T19:56:01.529585-07:00 yoda kernel: [  210.917515] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 4
    2023-11-03T19:56:01.529588-07:00 yoda kernel: [  210.918202] snd_hda_codec_realtek hdaudioC1D0: hda_codec_setup_stream: NID=0x2, stream=0x5, channel=0, format=0x31
    2023-11-03T19:56:01.540382-07:00 yoda kernel: [  210.929308] snd_hda_codec_realtek hdaudioC1D0: hda_codec_setup_stream: NID=0x3, stream=0x5, channel=0, format=0x31
    2023-11-03T19:56:01.552223-07:00 yoda kernel: [  210.941233] snd_hda_codec_realtek hdaudioC1D0: hda_codec_setup_stream: NID=0x6, stream=0x5, channel=0, format=0x31
    2023-11-03T19:56:01.564501-07:00 yoda kernel: [  210.952792] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 1
    2023-11-03T19:56:01.564543-07:00 yoda kernel: [  210.952802] tas2781-hda i2c-TIAS2781:00: Playback action not supported: 1
    2023-11-03T19:56:01.564549-07:00 yoda kernel: [  210.953554] snd_hda_codec_realtek hdaudioC1D0: hda_codec_setup_stream: NID=0x2, stream=0x5, channel=0, format=0x31
    2023-11-03T19:56:01.564552-07:00 yoda kernel: [  210.953560] snd_hda_codec_realtek hdaudioC1D0: hda_codec_setup_stream: NID=0x3, stream=0x5, channel=0, format=0x31
    2023-11-03T19:56:01.564557-07:00 yoda kernel: [  210.953564] snd_hda_codec_realtek hdaudioC1D0: hda_codec_setup_stream: NID=0x6, stream=0x5, channel=0, format=0x31
    2023-11-03T19:56:01.564560-07:00 yoda kernel: [  210.953568] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 1
    2023-11-03T19:56:01.564563-07:00 yoda kernel: [  210.953571] tas2781-hda i2c-TIAS2781:00: Playback action not supported: 1
    2023-11-03T19:56:08.771987-07:00 yoda kernel: [  218.162780] snd_hda_codec_realtek hdaudioC1D0: hda_codec_cleanup_stream: NID=0x2
    2023-11-03T19:56:08.772011-07:00 yoda kernel: [  218.162793] snd_hda_codec_realtek hdaudioC1D0: hda_codec_cleanup_stream: NID=0x6
    2023-11-03T19:56:08.772013-07:00 yoda kernel: [  218.162798] snd_hda_codec_realtek hdaudioC1D0: hda_codec_cleanup_stream: NID=0x3
    2023-11-03T19:56:08.772015-07:00 yoda kernel: [  218.162806] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 2
    2023-11-03T19:56:08.772018-07:00 yoda kernel: [  218.162812] tas2781-hda i2c-TIAS2781:00: Playback action not supported: 2
    2023-11-03T19:56:08.772020-07:00 yoda kernel: [  218.162897] tas2781-hda i2c-TIAS2781:00: tas2781_hda_playback_hook: action = 3
    2023-11-03T19:56:08.772022-07:00 yoda kernel: [  218.162904] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 1
    2023-11-03T19:56:08.772024-07:00 yoda kernel: [  218.164263] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 2
    2023-11-03T19:56:08.772031-07:00 yoda kernel: [  218.164615] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 3
    2023-11-03T19:56:08.777285-07:00 yoda kernel: [  218.164926] tas2781-hda i2c-TIAS2781:00: tasdevice_select_cfg_blk: dev_idx = 4
    2023-11-03T19:56:09.804071-07:00 yoda kernel: [  219.193721] snd_hda_intel 0000:c3:00.6: display power disable
    2023-11-03T19:56:12.524045-07:00 yoda kernel: [  221.915751] tas2781-hda i2c-TIAS2781:00: Runtime Suspend
    

    这是另一个问题。 当放大器处于软件关断状态时、从开始恢复到播放声音的延迟非常大。 根据数据表、开通时间应为1.13ms 或6.73ms、具体取决于音量斜坡。 如果您看一下日志、就会看到恢复和下一行之间的间隔是2.6秒。 因此,如果你得到一个终端或按键产生一个咔嗒声的时间播放声音已经有几个键按下和声音突然播放. 是否有可能消除该延迟? 难道不可能在暂停时进入软件关闭状态、在恢复时退出而不进行任何其他操作吗?

    2023-11-03T19:55:58.928694-07:00 Yoda 内核:[208.318032] tas2781-hda i2C-TIAS2781:00:运行时恢复
    2023-11-03T19:56:01.515994-07:00 Yoda 内核:[210.90492] tas2781-hda i2C-TIAS2781:00:tasdevice_select_cfg_blk:dev_idx = 1

    非常感谢您的帮助!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我将在下周删除调试日志。

    根据数据表,打开时间应为1.13ms 或6.73ms,具体取决于卷升。

    至于延迟问题、数据表仅提供芯片级数据。 SUSPEND 将使芯片崩溃、tas2781内的 FW 将丢失。 因此、恢复将下载 tas2781 DSP FW。  这需要一些时间。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    运行时暂停似乎在 按预期执行软件关断(将模式[2:0]位从010b 切换到000b、然后返回)。 为什么这会导致它丢失任何状态? 芯片未断电。 数据表似乎表明、寄存器将被保留、并且仅放大器的模拟部分将关闭。

    如果您所说的正确、那么在播放停止后的3秒内关闭芯片、然后再花3秒钟来加载许多 KB 的数据、例如只是为了播放按键单击声音、这并不是一个好的设计。 必须有一种方法来禁用它、否则它将不可用。 对于笔记本电脑来说,消费的差异是巨大的(超过一瓦),但现在它听起来并不好。

    我发现的另一个问题是、改变扬声器(L-R)的平衡不会影响放大器驱动的低音扬声器的平衡。 现在如此-两个放大器的数字增益只能设置为相同的音量水平。 您是否可以更改扬声器数字增益以使其分别左右跟踪?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    在我的笔记本电脑上、当放大器断电以及当它们通电但静音时、功耗的差异不符合要求。 我看不到任何差异。

    如果有办法关闭暂停/恢复、则会有所帮助。

    像这样将电源管理控制设置为打开(从自动)

    ECHO 打开>/sys/devices/platform/AMDI0010:03/i2C-3/i2C-TIAS2781\:00/电源/控制

    使驱动器不再挂起、但在空闲10-15秒后、放大器停止工作、不再输出声音。

    是否可以使暂停/恢复为可选状态?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我不确定这种处理方式是否 可以  被 Linux 社区接受。 如您所知、TI 已将 tas2781基本驱动程序代码发布到 Linux 社区、并热烈欢迎每位员工为改进此驱动程序代码贡献自己的力量。 至于你在这个主题中提到的要求,你也可以联系我们的营销人员,也许我们可以有业务合作,你的要求。 期待您的合作。

    此 致、

    丁圣豪

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    是的、我明白了。

    让我们重点关注剩余的问题、如果我们可以修复或改进:

    1.放大器空闲时间超过3秒后、启动时的~3s 较大滞后。 在 Windows 上,同样几乎是无法察觉的。

    2.放大器扬声器无法平衡左/右

    3.用户的运行时电源管理(设置为电源/控制)会阻止放大器输出声音

    请告诉我、如果需要、我将进行测试或提供更多信息。

    谢谢升豪。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    1.请确认  runtime_suspend 是否会硬关闭 tas2781的电源? 如果是、则不需要加载 DSP 固件、可以将其删除。 如果没有、没有比当前代码更好的解决方案。

    2. 关于 LL/R 的平衡,我建议您申请 tas2781 PPC3(TAS2781数据表,产品信息和支持| TI.com),一款用于 tas2781的声学调优工具,您可以调优您喜欢的内容。 我不确定这是否对终端用户开放。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    事实证明 RUNTIME_SUSPEND 不会进行硬件关断。 仅限软件关闭。 DSP 不会复位、无需重新加载固件。

    硬件复位来自固件。 您拥有的固件将寄存器5c 从19更改为 D9。 位7是 CLK_PWRUD、将寄存器设置为 D9会将该位设置为"开启"。 在该位设置为"ON"且停止播放之后-整个放大器会进行硬件关断。

    我破坏了代码、以使该位始终设置为19。

    从暂停状态变为恢复状态只需要200ms。 DSP 不再加载固件。

    2023-11-06T21:33:25.328752-08:00 Yoda 内核:[ 1014.716105] tas2781-hda i2C-TIAS2781:00:运行时恢复

    2023-11-06T21:33:25.540290-08:00 Yoda 内核:[ 1014.927369] SND_hda_codec_Realtek hdaudioC1D0:hda_codec_setup_stream:nid=0x2、stream=0x5、channel=0、format=0x31

    同时通过禁用 PM 控制

    ECHO 打开>/sys/devices/platform/AMDI0010:03/i2C-3/i2C-TIAS2781\:00/电源/控制

    可以正常工作、但不再需要、因为放大器可以很快退出软件关断状态。

    那么、您可以修复固件并发送新固件吗? 只有不设置 CLK_PWRUD 位的固件。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    对于左/右余量:

    您发送给我的内容:

    + for (i = 0; i <tas_priv->ndev; i++){
    + ret = tasdevice_dev_write (tas_priv、I、TAS2781_DVC_LVL、
    + TAS_priv->digital_gain);
    + if (!ret)
    +继续;
    + dev_err (tas_priv->dev、"set digital vol err in dev %d\n"、i);
    +}

    会改变两个放大器的音量、因此每次变化都会显示两倍的

    [ 1362.873368] tas2781-hda i2c-TIAS2781:00:tasdevice_digital_putvol 0x001a val=12
    [1362.874507] tas2781-hda i2c-TIAS2781:00: tasdevice_digital_putvol 0x001a val=12
    [1363.930240] tas2781-hda i2c-TIAS2781:00: tasdevice_digital_putvol 0x001a val=16
    [1363.931384] tas2781-hda i2c-TIAS2781:00: tasdevice_digital_putvol 0x001a val=16

    为什么需要 PUREPATHCONSOLE? 难道不可能用不同的体积更新每个放大器吗?

       ACARD_SINGLE_RANGE_EXT_TLV ("扬声器数字增益"、TAS2781_DVC_LVL、
          0、0200、1、tas2781_digital_getvol、
          tas2781_digital_putvol、dvc_tlv)、

    当前设置为单声道。 是否可以更改为立体声并允许每个放大器具有不同的值?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    当然、您可以在代码中设置它。 您还可以在 dspbin 文件中更改数字增益。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Shenghao:

    请分享如何创建 TIAS2781RCA4.bin 文件?

    您是否以某种方式编译 TIAS2781RCA4.json 文件? 您可以从 bin 文件返回 json 吗? 似乎有一些 regbin 工具可以做到这一点。 它在哪儿?

    PurePathcConsole 可以这么做吗? 如何实现? 步骤是什么?

    谢谢。

    达林

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    tool - lpa-android-drivers/pcmdevice-linux-driver - Unnamed repository;编辑此文件'description'以命名存储库。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这听起来不错。 我通过禁用运行时 PM 并修补二进制文件使其正常工作-我将关闭此窗口。

    如果有人需要信息-我把一些留在这里 github.com/.../yoga-slim-7