How do I change the default sound card?
#1
I would like to change the default audio to the headphone jack. I am running dietPi (no gui/de).  I know I can change the alsa default card with an environment variable or asound.conf, but I think that only affects alsa utilities. I'm also using sox, so I just want to change the default (first) card at the OS level.  Actually I could settle for getting sox to pick up a different card by default but I have not been successful in that.

So I think I need to create a file in /etc/modprobe.d, with lines like 


Quote:options sunxi_sndcodec index=0
options sunxi_codec index=1

I also tried reversing them:
Quote:options sunxi_codec index=0
options sunxi_sndcodec index=1

but it's not working. The hdmi output is always listed as the first card.


Code:
[email protected]:~# cat /proc/asound/cards
 0 [sndhdmi        ]: sndhdmi - sndhdmi
                      sndhdmi
 1 [audiocodec     ]: audiocodec - audiocodec
                      audiocodec

I'm just guessing at the driver names based on lsmod. Any ideas? Thanks.

here's the output of lsmod.

Code:
[email protected]:~# lsmod
Module                  Size  Used by
vfe_v4l2              747618  0
videobuf2_dma_contig    17668  1 vfe_v4l2
ir_lirc_codec          12756  0
lirc_dev               17032  1 ir_lirc_codec
videobuf2_memops       12546  1 videobuf2_dma_contig
mali                  199851  0
ir_sanyo_decoder       12491  0
ir_sony_decoder        12489  0
ir_jvc_decoder         12487  0
ir_mce_kbd_decoder     12628  0
ir_nec_decoder         12487  0
ir_rc5_decoder         12487  0
ir_rc6_decoder         12520  0
sunxi_ir_rx            12902  0
videobuf2_core         30952  1 vfe_v4l2
vfe_io                 34085  1 vfe_v4l2
ss                     33083  0
cedar_ve               17368  0
sunxi_i2s              13081  2
sunxi_sndcodec         17150  1
sunxi_codec            63040  1
  Reply
#2
There is a topic regarding earphones output.
Browse a little bit with keyword: audiojack
  Reply
#3
(10-01-2016, 07:18 AM)zirconx Wrote:
Quote:options sunxi_sndcodec index=0
options sunxi_codec index=1

I'm just guessing at the driver names based on lsmod. Any ideas? Thanks.

Ok, so the ALSA asound.conf change I've mentioned somewhere (do you think I can find it again? Dodgy ) probably won't help... SOX doesn't uses ALSA? Anyway, maybe have a look at /etc/modules-load.d/pine64-audiojack.conf ... maybe move sunxi_sndcodec up to to the top and see if that makes any difference (fingers cross no nasty errors ensue!)... I'd try myself but my bed calls... Big Grin
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Flashing SD card over USB ccben 5 1,134 07-25-2017, 10:11 PM
Last Post: ccben
  MicroSD card won't format Andr3w 2 794 07-12-2016, 11:10 AM
Last Post: Luke
  microSD card performance comparison [email protected] 14 4,632 06-21-2016, 03:10 AM
Last Post: simonritchie
  Making a Ubuntu Server image for SD Card insignia96 3 2,104 04-06-2016, 09:46 PM
Last Post: insignia96
  How to get Ubuntu SD Card Bob123456789 7 2,016 01-25-2016, 04:08 PM
Last Post: Ghost

Forum Jump:


Users browsing this thread: 1 Guest(s)