ASoC: tegra-alt: Fix device name for RT565x machine driver

Overriding the device name for the Tegra RT565x machine driver is
preventing UDEV rules for Systemd and L4T from detecting the sound
card. The sysfs path for the sound card is
'/sys/devices/sound/sound/card1' but by changing the device name
the systemd-udev service is looking for the sound card under
'/sys/devices/tegra-snd-t186ref-mobile-rt565x/sound/card1' which
does not exist. This is seen by checking the systemd log ...

 ubuntu@tegra-ubuntu:~$ sudo journalctl -b | grep rt565x
 ...
 Feb 28 16:30:22 tegra-ubuntu systemd-udevd[2934]: error opening \
 ATTR{/sys/devices/tegra-snd-t186ref-mobile-rt565x/sound/card1/controlC1/../uevent} \
 for writing: No such file or directory

This prevents ...
1. The systemd udev rule '/lib/udev/rules.d/78-sound-card.rules'
   from detecting the card and setting the udev enviroment variable
   'SOUND_INITIALIZED' for the card. This in turn prevents pulseaudio
   from seeing the card.
2. The L4T udev rule '/etc/udev/rules.d/90-alsa-asound-tegra.rules'
   from detecting the card and setting the initial state of the
   sound card.

Fix this by removing the code that overrides the device name for
the Tegra RT565x machine driver.

Bug 2019300
Bug 2067653
Bug 2067087
Bug 200382657

Change-Id: Ie371c1b3211cc4742d2e35c8e6976b01e1c23c31
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1666573
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2018-02-28 18:10:54 +00:00
committed by Sameer Pujar
parent 540f5ece2c
commit 03857bc5e4

View File

@@ -1303,13 +1303,6 @@ static int tegra_machine_driver_probe(struct platform_device *pdev)
if (ret)
goto err;
/* update device name with card name */
if (dev_set_name(&pdev->dev, "%s", card->name) < 0) {
dev_err(&pdev->dev, "error in setting machine driver device name\n");
ret = -ENODEV;
goto err;
}
match = of_match_device(tegra_machine_of_match, &pdev->dev);
if (!match) {
dev_err(&pdev->dev, "Error: No device match found\n");