Single-board computer software development discussions
 help / color / mirror / Atom feed
From: "Павел Исопенко" <master@pauli.ru>
To: devel-sbc@lists.altlinux.org
Subject: Re: [devel-sbc] Патч, восстанавливающий работоспособность звуковой подсистемы для nanopc-t4
Date: Thu, 14 Nov 2019 23:45:15 +0300
Message-ID: <82f766b3-82b5-1d5a-14b1-b5f639f287b9@pauli.ru> (raw)
In-Reply-To: <02d8bce9-e095-71ed-311e-8054dd904016@pauli.ru>

Был неточен. Поправлюсь.

#!/bin/sh

TMPFCMD="/tmp/dialog.file"

dialog --clear --title "Добрый день, $USER!" --menu "\
Выберите желаемый аудиовыход:" 10 50 2    "0"  "HDMI audio device"   "1" 
"3,5мм headphone jack" 2> $TMPFCMD
CMD2RUN=$(cat $TMPFCMD)
if [ "$?" -eq "0" ]; then
case "$CMD2RUN" in
     '0')
     echo 'Вы выбрали HDMI audio device'
     amixer -c0 cset numid=3 2
     ;;
     '1')
     echo 'Вы выбрали 3,5мм headphone jack'
     amixer -c0 cset numid=3 1
     ;;
     '-1')
     echo 'Вы вышли, нажав ESC, или же внутри dialogа произошла ошибка'
     exit 1
     ;;
esac
fi

rm -f $TMPFCMD

14.11.2019 21:24, Павел Исопенко пишет:
> Да. Для RPi решение нашлось через amixer:
> ### Вывод звука на 3,5" headphones jack ###
> $ amixer -c 0 cset nimid=3 1
> 
> $ amixer -c 0 cset nimid=3 <n>
> Где:
> $ - давать команду от обычного (текущего) пользователя
> n = 0 auto, 1 headphones, 2 hdmi
> 
> Прямо сейчас с аналогового порта мне играет RPi3B. Колонки SVEN 120. Как 
> я понял, по умолчанию в наших образах звук по умолчанию идёт на HDMI - и 
> это хорошо.
> 
> 14.11.2019 19:07, Lenar Shakirov пишет:
>> Добрый день!
>>
>> На Rpi4 столкнулся с отсутствием звука в аналоговом порту, может быть
>> кто-то сталкивался и чинил подобное?
>>
>> В dmesg вижу:
>> [    5.171496] Error: Driver 'sdhost-bcm2835' is already registered, 
>> aborting...
>> ....
>> [   14.246059] bcm2835_audio bcm2835_audio: Failed to get DT property
>> 'brcm,pwm-channels'
>> _______________________________________________
>> devel-sbc mailing list
>> devel-sbc@lists.altlinux.org
>> https://lists.altlinux.org/mailman/listinfo/devel-sbc
>>
> 

-- 
С уважением, Павел Исопенко
тел. +79165329582
email: master@pauli.ru
XMPP: pavelri@jabber.credoaudit.ru


  reply	other threads:[~2019-11-14 20:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14 16:07 Lenar Shakirov
2019-11-14 18:24 ` Павел Исопенко
2019-11-14 20:45   ` Павел Исопенко [this message]
2019-11-18 15:50     ` Lenar Shakirov
2019-11-19  7:36       ` Pavel Isopenko
2019-11-20 12:57     ` [devel-sbc] Переключение звука на RPI4 Антон Мидюков
2019-11-20 13:17       ` Alexey V. Vissarionov
2019-11-20 14:47       ` Pavel Isopenko
2019-11-20 14:54         ` Антон Мидюков

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=82f766b3-82b5-1d5a-14b1-b5f639f287b9@pauli.ru \
    --to=master@pauli.ru \
    --cc=devel-sbc@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Single-board computer software development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-sbc/0 devel-sbc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-sbc devel-sbc/ http://lore.altlinux.org/devel-sbc \
		devel-sbc@lists.altlinux.org devel-sbc@lists.altlinux.ru devel-sbc@lists.altlinux.com
	public-inbox-index devel-sbc

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-sbc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git