📜 ⬆️ ⬇️

As a Windows driver crafty breaks sound in Linux or painful bug searches

Instead of intro

Cheap “room of fear” is dark and everywhere a rake.
Thoughtfully looking at the correction of the ruble exchange rate to fall into the deep chasms , I decided that it makes no sense to remain with a rapidly devaluing paper on my hands and it is time to upgrade outdated hardware. The choice was for Gigabyte GA-Z97-D3H, because I wanted to have interfaces for SSD "for growth". M.2 and Sata Express promise up to 10 Gbit / s per port, which can not but rejoice amid a rapid increase in the speed of the drives. He collected, performed the rite of applying thermal paste and solemnly sprinkled a system unit with beer, as expected and immediately plunged into the exciting world of rakes and mysterious bugs. Hero of the occasion.

Simple joys of linuksoid

Just want to say - I am not a harsh, bearded piece of iron, healing controllers by the laying on of hands. Maximum - slightly bristly linux-user, using open source software in work and life. In the secret underground headcrab cultivation lab in which I work, there are often tasks involved in processing audio and video materials from the work. Zip zergling's hatching process there or something else ... In short, without Audacity and Kdenlive nowhere. Realtek ALC1150 on the motherboard, as always, promised unearthly bliss and crystal bells fluttering under the spring wind on top of the Himalayas.

In search of a rake

And so, I habitually broke the SSD into sections for Windows 7 (yes, I don't like tiles) and Kubuntu 14.04 LTS. After a superficial configuration, Windows rebuilt in Linux and was surprised at the lack of sound. Having decided that the core, as always, does not keep up with fresh iron, I found it useful to search for known bugs on the z97 chipset. The first bug that came across , sadly told about distortions and wheezing on this chipset among Ubuntu 14.04 users. I looked at the recommendations superficially and tried to do this:
echo "options snd-hda-intel vid=8086 pid=8ca0 snoop=0" >> /etc/modprobe.d/alsa-base.conf 
After the reboot, silence still filled the speakers. Not very upset, I noticed that in the kernel version> 3.16 the problem should be fixed. Apparently, despite promises to sit on stable LTS releases, the Universe was pushing me in the previous series of continuous updates and searches for what had fallen off this time. Having completed the do-release-upgrade, I was glad that there were no major changes, but the problem still remained. Then I decided to make a contribution to the development of open source software and file down the fixed bug report. In addition to the standard logs, I decided to try to give the sound manually, without using pads like Phonon and PulseAudio. First we define the devices:
 meklon@meklon-desktop:~/$ aplay -l ****  PLAYBACK  ****  0: PCH [HDA Intel PCH],  0: ALC1150 Analog [ALC1150 Analog] : 1/1  №0: subdevice #0  0: PCH [HDA Intel PCH],  1: ALC1150 Digital [ALC1150 Digital] : 1/1  №0: subdevice #0  1: HDMI [HDA ATI HDMI],  3: HDMI 0 [HDMI 0] : 1/1  №0: subdevice #0 
First of all, we check that we don’t have a low mute (thanks for the ValdikSS tips):
 meklon@meklon-desktop:~/$ amixer set Master 100 unmute 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] 
Now we are trying to sound directly using the console omnivorous mplayer:
 meklon@meklon-desktop:~/$ amixer set Master 100 unmute 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] meklon@meklon-desktop:~/$ mplayer --ao=alsa:device=hw=0.0 0.mp3 MPlayer2 2.0-728-g2c378c7-2ubuntu3 (C) 2000-2012 MPlayer Team Cannot open file '/home/meklon/.mplayer/input.conf': No such file or directory Failed to open /home/meklon/.mplayer/input.conf. Cannot open file '/etc/mplayer/input.conf': No such file or directory Failed to open /etc/mplayer/input.conf. Playing 0.mp3. Detected file format: MP2/3 (MPEG audio layer 2/3) (libavformat) [mp3 @ 0x7f43bdf90b40]max_analyze_duration 5000000 reached [mp3 @ 0x7f43bdf90b40]Estimating duration from bitrate, this may be inaccurate [lavf] stream 0: audio (mp3), -aid 0 Clip info: album_artist: Emma Chapplin track: 17 title: Spente Le Stelle (Live Version) artist: Emma Shapplin album: Forever Gold genre: Classical date: 2000 Load subtitles in . Selected audio codec: MPEG 1.0/2.0/2.5 layers I, II, III [mpg123] AUDIO: 44100 Hz, 2 ch, s16le, 320.0 kbit/22.68% (ratio: 40000->176400) AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample) Video: no video Starting playback... A: 6.5 (06.5) of 334.7 (05:34.7) 0.4% 
And again we listen to silence. Decay and hopelessness. Windows at the same time continues to delight normal sound, eliminating hardware problems. Sensing the awakening of a bearded software tester, I decide to sort through all the possible options:

The killer is a janitor

As you may have guessed from the name of the post - the problem in Windows. And don't care that there were a million reboots, on and off, launches from all possible media. So, the drumming and solution of the problem in the form of a huge crutch, rewound with electrical tape: In order for sound to appear, you need to physically de-energize the system unit. Yes. It is de-energize. If you run Windows at least once, the sound will disappear again. Reboots and normal shutdown do not help. Windows, when started, does something in the meanest way with the controller's hardware on the motherboard, making it inaccessible on Linux systems. Enemy intrigues are not otherwise. So, as I am not an expert in the field of low-level iron and the core, I leave the search for a solution for more bearded comrades in misfortune. By the way, I still stumbled upon a description of my bug after it had revealed its cause. Taking this opportunity, I want to clarify what should I do with my bug report? How does his sdurgit with the earlier? UPD 4 Bug entered in the database kernel.org. Please unsubscribe all affected. Link to Bugzilla UPD 5 In the process of debugging with the help of dark magic, it seems to have felt the problem. After entering the next one into the console, the sound appears:
 apt-get install alsa-tools root@meklon-desktop:/home/meklon# hda-verb /dev/snd/hwC0D2 0x20 SET_COEF_INDEX 0x07 nid = 0x20, verb = 0x500, param = 0x7 value = 0x0 root@meklon-desktop:/home/meklon# hda-verb /dev/snd/hwC0D2 0x20 SET_PROC_COEF 0x7cb0 nid = 0x20, verb = 0x400, param = 0x7cb0 value = 0x0 
UPD 6 A bug marked as resolved Fix will be included in the 3.18-rc5 kernel. If someone can help in backporting, it would be great.

')

Source: https://habr.com/ru/post/242253/


All Articles